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

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

@robocoder
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.

@robocoder
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)

@mattab
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.