Ticket #597 (closed New feature: fixed)

Opened 3 years ago

Last modified 3 years ago

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

Reported by: bpouzet Owned by:
Priority: critical Milestone: RobotRock
Component: New Plugin Keywords:
Cc: bpouzet@… Sensitive:

Description

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

Attachments

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

Change History

Changed 3 years ago by vipsoft

What's the use case?

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

Changed 3 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

Changed 3 years ago by bpouzet

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

Changed 3 years ago by vipsoft

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 3 years ago by bpouzet

Rename method to getTranslationsForLanguage()

Changed 3 years ago by bpouzet

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

Changed 3 years ago by matt

  • priority changed from major to critical

Changed 3 years ago by matt

  • status changed from new to closed
  • resolution set to fixed

(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.