Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
anonymous-piwik-user opened this Issue · 7 comments

3 participants

Anonymous Piwik user Anthon Pang Matthieu Aubry
Anonymous Piwik user

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

Anthon Pang
Collaborator

What’s the use case?

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

Anonymous Piwik user

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

Anonymous Piwik user

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

Anthon Pang
Collaborator

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() ?

Anonymous Piwik user

Attachment: Rename method to getTranslationsForLanguage() [API.php](http://issues.piwik.org/attachments/597/API.php)

Anonymous Piwik user

Attachment: I create a test case, but I don’t know if it’s correct [LanguagesManager.test.php](http://issues.piwik.org/attachments/597/LanguagesManager.test.php)

Matthieu Aubry
Owner

(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

Anonymous Piwik user anonymous-piwik-user added this to the RobotRock milestone
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.