Closed Bug 429358 Opened 16 years ago Closed 16 years ago

Ability to localize UI using cleaned up language.php

Categories

(support.mozilla.org :: General, defect, P1)

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: djst, Assigned: nkoth)

Details

The interactive UI translation works well for retouching or adding a limited number of strings, but is very inefficient when localizing the UI from scratch. In addition, not all strings are possible to localize this way, because they're either not accessible when logged in (e.g. the "Log in" string), or they're lacking the small ring (e.g. command button labels). 

We need the ability to export all strings SUMO is using, including the ones that aren't yet in the db, and save it as a text file (language.php) for localizers to translate in one fell swoop offline. 

Then localizers could just email that file back to us and we would re-import.
if someone could modify this file http://svn.mozilla.org/projects/sumo/trunk/get_strings.php,

it should do the trick
that get_strings.php looks for strings in all the files in TikiWiki right now. We need to limit it  to only those that we actually use for Sumo.
What about error strings that aren't in the template?
Using get_strings.php on a reduced set of files in TikiWiki generates a reduced list of strings. I have reduced it as much as I could.

These strings can be found in the language files in http://svn.mozilla.org/projects/sumo/trunk/language_files/ by locating the section  "// ### start of untranslated words"

Just uncomment value pairs as you translate, and provide the updated language.php file after translation as a patch/bug to update a language.

Let me know if anything more needs to be done.
There are strings not included on the new language.php. dynamis (Japanese localizer) reported that strings like "Contributor Tools" doesn't exist in http://svn.mozilla.org/projects/sumo/trunk/language_files/ja/language.php.

Nelson, is this because they're not part of the template, or did the script miss these??
It seems the script failed to import most of the sidebar stuff, including:

* User Tools
* Contributor Tools
* Need More Help?
* Using SHOWFOR
* Articles I Monitor for Changes
* ...

http://support.mozilla.com/tiki-register.php
 * Contributors - people looking to help others
 * Users logged into the system
are also not included in the language.php

Unfortunately it seems that there are many entities not in the language.php now...
Here are some more examples which are not in the langage.php

http://support-stage.mozilla.org/ja/kb/
 * New to Firefox?
 * Most Popular Support Articles
 * More articles...

http://support-stage.mozilla.org/ja/kb/Support+Website+Forums
 * Have you searched the knowledge base yet? If not, search here first.
 * If you can't find your answer, ask your question in the forum.
 * If you asked a question previously, log in to find the questions ...
 * Most Popular Threads
 * Most Recently Answered

http://support-stage.mozilla.org/tiki-view_forum.php?locale=ja&forumId=1&openpost=1
 * Now, give us more detail. Some things you can include:
   * The steps you took to get the problem
   * If you get an error message, the text of the message
   * If it happens on a particular website, the address of the site
 * Telling us about your system will help us solve your problem more ...
   * What Firefox version are you having a problem with?
   * What operating system is it running on?
   * Which extensions (for example Adblock Plus, VideoDownloader, ...
   * If you think it would be useful, you can post a screenshot.
(In reply to comment #8)
> Here are some more examples which are not in the langage.php
> 
> http://support-stage.mozilla.org/ja/kb/
>  * New to Firefox?
>  * Most Popular Support Articles
>  * More articles...

These are actually part of the start page itself (the editable/translatable wiki area). Thanks for the other strings though.

Nelson, can you please make this a priority? We are running out of time for l10n.
The missing strings in the "ask a question in forum" form and the registration page can now be manually added to language.php. The template tags to translate them were missing before but are now in r14277.

Remaining problems are summarized below (have to fix):

1) Content in custom user modules are not translating, even if {tr} is used in the user module content.

2) Module titles are not being translated. 

Keywords: push-needed
Priority: -- → P1
patch in r14277 merged into production branch in r14705
made script replace existing translations in addition to adding new ones in r15004, r15005 (1.1) and, r15006 (production)
For item 1) below, I was wondering if using dynamic content (which can be localized) inside user modules might be a possible workaround.

> Remaining problems are summarized below (have to fix):
> 
> 1) Content in custom user modules are not translating, even if {tr} is used in
> the user module content.
> 
> 2) Module titles are not being translated. 
> 

(In reply to comment #13)
> For item 1) below, I was wondering if using dynamic content (which can be
> localized) inside user modules might be a possible workaround.
> 
> > Remaining problems are summarized below (have to fix):
> > 
> > 1) Content in custom user modules are not translating, even if {tr} is used in
> > the user module content.


Could you explain what you mean and what the implications would be?
And what's the solution for 2)?
There is now a fix in for (1) in the form of {TR()}text to translate{TR} syntax committed to: r15387 (trunk), r15388 (1.1), and r15389 (production branch)




> > Remaining problems are summarized below (have to fix):
> > 
> > 1) Content in custom user modules are not translating, even if {tr} is used in
> > the user module content.
> > 
> > 2) Module titles are not being translated. 
> > 
> 

the fix for (2) is to add {tr}{/tr} tags to {$module_title} in module.tpl. Done in r15390 (trunk), r15391 (1.1), and r15392 (production branch).

(In reply to comment #15)
> And what's the solution for 2)?
> 

Once this is pushed:

To add {TR()} {TR} tags around all strings in modules that need to be translated, and then inform localizers what these strings are (so that they can add them to their language.php files).

The module titles can already be added.
Hello,

I seem to have found another string not present in language.php - at least I did not manage to find it.

In the email notification about new comments added to a page, I got

"<users name> commented on the page <page name>"

the rest of the message is translated, but that particular string is not.
Will open a new bug for translations of redesign. 
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Filed bug 442916 for that.
Whiteboard: tiki_triage
Whiteboard: tiki_triage → tiki_feature
I don't know why this was flagged for upstreaming.
Probably a mistake.
Whiteboard: tiki_feature
You need to log in before you can comment on or make changes to this bug.