Last Comment Bug 624405 - Localize Theme Descriptions (was: Upload Finnish descriptions of themes to Mercurial)
: Localize Theme Descriptions (was: Upload Finnish descriptions of themes to Me...
Status: RESOLVED FIXED
[good first bug]
:
Product: SeaMonkey
Classification: Client Software
Component: Preferences (show other bugs)
: Trunk
: All All
: -- enhancement (vote)
: seamonkey2.1b3
Assigned To: Aki Laaksovirta
:
:
Mentors:
Depends on: 436668
Blocks:
  Show dependency treegraph
 
Reported: 2011-01-10 09:22 PST by Aki Laaksovirta
Modified: 2011-03-19 17:57 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
The Finnish description strings (1.92 KB, patch)
2011-01-10 09:23 PST, Aki Laaksovirta
no flags Details | Diff | Splinter Review
The Finnish description strings 2.0 (1.92 KB, patch)
2011-01-10 09:32 PST, Aki Laaksovirta
no flags Details | Diff | Splinter Review
patch for making theme descriptions localizable (2.47 KB, patch)
2011-02-14 09:00 PST, Aki Laaksovirta
kairo: review+
Details | Diff | Splinter Review

Description Aki Laaksovirta 2011-01-10 09:22:06 PST
User-Agent:       Mozilla/5.0 (X11; U; Linux i686 (x86_64); fi; rv:1.9.1.16) Gecko/20101123 Lightning/1.0b1 SeaMonkey/2.0.11
Build Identifier: 

So, I have translated the descriptions of both "SeaMonkey Default" and SeaMonkey Modern" themes, and I would like to see someone import it to Mercurial.

Reproducible: Always
Comment 1 Aki Laaksovirta 2011-01-10 09:23:20 PST
Created attachment 502511 [details] [diff] [review]
The Finnish description strings
Comment 2 Aki Laaksovirta 2011-01-10 09:25:35 PST
Comment on attachment 502511 [details] [diff] [review]
The Finnish description strings

>diff --git a/suite/themes/classic/install.rdf b/suite/themes/classic/install.rdf
>--- a/suite/themes/classic/install.rdf
>+++ b/suite/themes/classic/install.rdf
>@@ -33,12 +33,23 @@
>     <em:appManaged>true</em:appManaged>
> 
>     <em:locked>true</em:locked>
> 
>     <!-- Front End Integration Hooks (used by Theme Manager)-->
>     <em:creator>Mozilla Contributors</em:creator>
>     <em:contributor>Mozilla Contributors</em:contributor>
> 
>+    <em:localized>
>+      <Description>
>+        <em:locale>fi</em:locale>
>+        <em:name>Oletus</em:name>
>+        <em:description>Tämä teema hyödyntää järjestelmän tarjoamia tyylejä sekä värejä sopiakseen hyvin yhteen muiden sovellusten kanssa.</em:description>
>+        <em:creator>Mozilla-projektin tukijat</em:creator>
>+        <em:contributor>Mozilla-projektin tukijat</em:contributors>
>+        <em:translator>Aki Laaksovirta</em:translator>
>+      </Description>
>+    </em:localized>
>+
>     <em:internalName>classic/1.0</em:internalName>
>   </Description>
> 
> </RDF>
>diff --git a/suite/themes/modern/install.rdf b/suite/themes/modern/install.rdf
>--- a/suite/themes/modern/install.rdf
>+++ b/suite/themes/modern/install.rdf
>@@ -32,12 +32,23 @@
>     <em:appManaged>true</em:appManaged>
> 
>     <em:locked>true</em:locked>
> 
>     <!-- Front End Integration Hooks (used by Theme Manager)-->
>     <em:creator>Mozilla Contributors</em:creator>
>     <em:contributor>Mozilla Contributors</em:contributor>
> 
>+    <em:localized>
>+      <Description>
>+        <em:locale>fi</em:locale>
>+        <em:name>Moderni</em:name>
>+        <em:description>Nykyaikainen teema kaikille ohjelmakomponenteille.</em:description>
>+        <em:creator>Mozilla-projektin tukijat</em:creator>
>+        <em:contributor>Mozilla-projektin tukijat</em:contributors>
>+        <em:translator>Aki Laaksovirta</em:translator>
>+      </Description>
>+    </em:localized>
>+
>     <em:internalName>modern/1.0</em:internalName>
>   </Description>
> 
> </RDF>
Comment 3 Aki Laaksovirta 2011-01-10 09:32:18 PST
Created attachment 502514 [details] [diff] [review]
The Finnish description strings 2.0
Comment 4 Axel Hecht [:Pike] 2011-01-10 09:42:32 PST
I'd suggest to just make them localizable by prefs like we do in fx, http://mxr.mozilla.org/comm-central/source/mozilla/browser/app/profile/firefox.js#210
Comment 5 Aki Laaksovirta 2011-01-12 05:42:12 PST
What is the "[good first bug]" whiteboard status doing here? I have filed at least 5 bugs before this one.
Comment 6 David Tenser [:djst] 2011-01-12 05:54:31 PST
Aki, it just means that it's a good bug for anyone who wants to start contributing code to Mozilla because it's relatively easy to fix. We mark bugs with this to allow new code contributors to easily find bugs to get started with.
Comment 7 Axel Hecht [:Pike] 2011-01-12 05:56:58 PST
There's a bit of implicit communication here, beyond that. Philip moving this bug to preferences probably implies his support for my suggestion in comment 4, which would obsolete the patch that you already attached.

Feel free to propose a patch implementing the prefs way to localize the theme description. https://developer.mozilla.org/en/Localizing_extension_descriptions and the original fx patch in http://hg.mozilla.org/mozilla-central/rev/432fb39d5655 should be a good starting point.
Comment 8 Aki Laaksovirta 2011-01-12 06:43:46 PST
What advantage do we get by implementing this as a pref? "Because Firefox already has it that way" is simply not a reason good enough. And, as you can see, the patch that has been landed in mozilla-central changes entries in two files. Even that is too much if we can do this by changing entries in just one file. Additionally, modifying install.rdf is the more correct way in this case, since  prefs were originally created for quite a different use.
Comment 9 Philip Chee 2011-01-12 08:08:41 PST
> What advantage do we get by implementing this as a pref?

Doing it the Firefox way makes it easier for Localizers who then only have to remember one way of doing things on Firefox/Thunderbird/SeaMonkey

> And, as you can
> see, the patch that has been landed in mozilla-central changes entries in two
> files.
Yes but once done localizers in all locales don't have to notice that they have to localize install.rdf. Instead they can use their normal tools to localize the properties file which they know how to do. FWIW Babelzilla uses this method to localize extension descriptions as well.
Comment 10 Aki Laaksovirta 2011-01-12 08:40:42 PST
> Doing it the Firefox way makes it easier for Localizers who then only have to
> remember one way of doing things on Firefox/Thunderbird/SeaMonkey

Sorry, but SeaMonkey is different. We rely on the "right method for the right purpose" principle rather than some nasty hack.
 
> Yes but once done localizers in all locales don't have to notice that they have
> to localize install.rdf. Instead they can use their normal tools to localize
> the properties file which they know how to do. FWIW Babelzilla uses this method
> to localize extension descriptions as well.

So? Localizing install.rdf would be, as I said, the correct way to do this. The localizers wouldn't necessarily have to do this by themselves, they could just be asked to post the translations on .l10n and we could do the rest. FWIW Adblock Plus uses the correct method to localize extension descriptions as well. BTW the bug that this bug was made to depend on has been fixed for a long time.
Comment 11 Robert Kaiser 2011-01-12 15:35:31 PST
The right thing is for localizers NEVER to have to touch any of those nasty RDF files. getting it into .properties in some way is the only right way in the current Mozilla setup.
Comment 12 Aki Laaksovirta 2011-01-24 01:18:23 PST
Ah, well. I don't actually know what is the right way in this case. Sorry about the flaming.
Comment 13 Aki Laaksovirta 2011-02-14 09:00:02 PST
Created attachment 512174 [details] [diff] [review]
patch for making theme descriptions localizable

This should do it. Does this one need any reviews?
Comment 14 Jens Hatlak (:InvisibleSmiley) 2011-02-14 09:39:43 PST
(In reply to comment #13)
> Does this one need any reviews?

Everything does. Try iann_bugzilla.
Comment 15 Philip Chee 2011-02-14 10:24:36 PST
Comment on attachment 512174 [details] [diff] [review]
patch for making theme descriptions localizable

Hmm. For L10n I'd think Kairo@kairo.at would be a better reviewer.
Comment 16 Robert Kaiser 2011-02-16 16:40:15 PST
Comment on attachment 512174 [details] [diff] [review]
patch for making theme descriptions localizable

Interesting, didn't know this worked that way, but after looking it up through the original bug etc. this sounds like the way we want to do it from inside the application, yes.

Thanks for the patch!
Comment 17 Philip Chee 2011-02-16 20:19:16 PST
Pushed to comm-central
http://hg.mozilla.org/comm-central/rev/b5bc77e944d2

Note You need to log in before you can comment on or make changes to this bug.