[l10n] Hardcoded strings in glow

RESOLVED FIXED

Status

Websites
glow.mozilla.org
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: linostar, Unassigned)

Tracking

Firefox 4

Details

Attachments

(1 attachment)

(Reporter)

Description

7 years ago
Glow contains 3 hardcoded entries that should be localizable. Two of them are 'Facebook' and 'Twitter' on their corresponding buttons. The third is the 'about' message that appears when clicking on the '?' button.
Comment on attachment 520890 [details] [diff] [review]
patch

Thanks for the patch. I'm r- because this messes up what little SEO we have. I wasn't thinking about this at all, but I've seen the :about text automatically pulled into google and facebook and other places as the description text for glow.

We need to figure out a different method that preserves some text on the page without requiring javascript. Sorry we didn't consider this better during planning.
Attachment #520890 - Flags: review-
maybe php/python gettext? I can provide a patch - it should be easy
I added the new strings to messages.po in r86247.
And I updated the files on Verbatim: https://localize.mozilla.org/projects/glow/

Sadly, we went down from 88% complete to 30% complete word-wise.

Jeff, Potch: do you want gandalf/me to create a patch that would enable a proper gettext support in PHP?  We can do this no problem--just let us know.
Thanks for the offer. If we go to server-side gettext then we'll have to add Vary: Accept-Language or put locales in URLs. I like our pretty locale-free URLs, and I don't think our traffic will hurt it we're Varying on language.

We'll still need js gettext for the arc chart, so the normal extraction process won't work. And I hate the way gettext looks in PHP (it's not great in Python either), so I'm biased against it.

If we start using data-gettext=true attributes and get the strings from $(el).text(), I think we can get the best of both worlds. What do you guys think?

Updated

7 years ago
Blocks: 632886
https://github.com/potch/glow/commit/94c5801 
https://github.com/potch/glow/commit/f6a2076 
https://github.com/potch/glow/commit/c35c0f2 

I'll sync prod later tonight.
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
If I'm reading the code right, you made the string localizable, but were you able to solve the problem you brought up in comment 2?


(In reply to comment #2)
> Thanks for the patch. I'm r- because this messes up what little SEO we have. I
> wasn't thinking about this at all, but I've seen the :about text automatically
> pulled into google and facebook and other places as the description text for
> glow.

Comment 9

7 years ago
(In reply to comment #5)
> And I updated the files on Verbatim:
> https://localize.mozilla.org/projects/glow/
> 
> Sadly, we went down from 88% complete to 30% complete word-wise.
> 
> Jeff, Potch: do you want gandalf/me to create a patch that would enable a
> proper gettext support in PHP?  We can do this no problem--just let us know.

I don't see Romanian language. Localizing for Romanian not exist? 
Here is locale for Glow: https://svn.mozilla.org/projects/l10n-misc/trunk/glow/locale/ ?

I would like to translate this project.
Hey Raul.  This bug isn't really the right place to request this, but I wanted to let you know that I've added Romanian on Verbatim: https://localize.mozilla.org/ro/glow/LC_MESSAGES/  Please email me at stas@mozilla.com if you need any assistance.  Thanks!

Comment 11

7 years ago
(In reply to comment #10)
> Hey Raul.  This bug isn't really the right place to request this, but I
> wanted to let you know that I've added Romanian on Verbatim:
> https://localize.mozilla.org/ro/glow/LC_MESSAGES/  Please email me at
> stas@mozilla.com if you need any assistance.  Thanks!

Hello Stas. I send you an email with my request.
You need to log in before you can comment on or make changes to this bug.