Opened 5 years ago

Closed 5 years ago

#597 closed New feature (fixed)

Add new method to languagesManager to show all string of a language

Reported by: bpouzet Owned by:
Priority: critical Milestone: RobotRock
Component: Plugins Wishlist Keywords:
Cc: bpouzet@… Sensitive:

Description

Add a new method to languagesManager to provide all string of a language.

Attachments (2)

API.php (3.5 KB) - added by bpouzet 5 years ago.
Rename method to getTranslationsForLanguage()
LanguagesManager.test.php (897 bytes) - added by bpouzet 5 years ago.
I create a test case, but I don't know if it's correct

Download all attachments as: .zip

Change History (8)

comment:1 Changed 5 years ago by vipsoft (robocoder)

What's the use case?

A plugin should already be able to access all the strings stored in the $translations array.

comment:2 Changed 5 years ago by bpouzet

Yes, I'm sorry, I wasn't clear enough.

I would like to have access all the strings from API via the LanguagesManager Module.

For example, call API LanguagesManager.getAvailableLanguageString(languageCode)
and it will return all the strings of the language (in xml, ....).

All that, to reuse the translators's works in other projects (in my case DWA application http://www.desktop-web-analytics.com).

Thanks

comment:3 Changed 5 years ago by bpouzet

I just add the new method and send the file in attachment.

comment:4 Changed 5 years ago by vipsoft (robocoder)

Can you add a test case (tests/core/LanguagesManager.test.php doesn't yet exist) at least for the new method you created, and rename the method as: getTranslationsForLanguage() ?

Changed 5 years ago by bpouzet

Rename method to getTranslationsForLanguage()

Changed 5 years ago by bpouzet

I create a test case, but I don't know if it's correct

comment:5 Changed 5 years ago by matt (mattab)

  • Priority changed from major to critical

comment:6 Changed 5 years ago by matt (mattab)

  • Resolution set to fixed
  • Status changed from new to closed

(In [1001]) - fixed #597 Add new method to languagesManager to show all string of a language
ps: renamed from getTranslationsForLanguages to getTranslationsForLanguage
patch by benoit pouzet

Note: See TracTickets for help on using tickets.