Closed
Bug 1198610
Opened 10 years ago
Closed 10 years ago
Blank translations won't save in Pontoon
Categories
(Webtools Graveyard :: Pontoon, defect)
Webtools Graveyard
Pontoon
Tracking
(firefox43 affected)
RESOLVED
FIXED
| Tracking | Status | |
|---|---|---|
| firefox43 | --- | affected |
People
(Reporter: petercpg, Assigned: mathjazz)
Details
STR:
1. Open any project in Pontoon
2. Clear any text block, click save, and reload page
3. Observe the text block
Expected: The text block should be cleared.
Actual: The text block is not cleared.
--
I was localizing Pontoon-intro project into zh-TW and intended to merge the two-line subtitles (e.g., HOVER<br>over web content) in the "HOW" section into one. Having the next line cleared (or hidden), the texts show up again after reloading.
In fact I'm not sure if this is a feature or bug, but if this is a feature, maybe it would be great to have a button to leave a text block blank?
| Assignee | ||
Comment 1•10 years ago
|
||
It looks like a bug (or a feature?) of the l10n library we use in Pontoon Intro:
https://pontoon.mozilla.org/intro/
NI stas (on PTO this week), who helped me set this up, to clarify.
A little bit of background. Pontoon allows saving empty translations for some file formats only, because others don't distinguish between empty translations and untranslated strings.
Pontoon Intro uses .properties file format, which allows saving empty translations. If you check out the sidebar, you will see your strings correctly stored as empty and marked as translated. Empty translations also ended up in GitHub:
https://github.com/mozilla/pontoon-intro/blob/master/static/locales/zh-TW/messages.properties#L31
From there on, it's upon the l10n library to figure out what to do with translations. Apparently the l10n library we use for Pontoon Intro treats empty translations same as untranslated strings.
Unlike the old (web)l10n.js we use for Choose Independent, which "hides" empty translations as expected:
https://pontoon.mozilla.org/ro/choose-independent/
A question for stas: Shouldn't empty translation (marked as "key=") be presented as empty DOM node (marked as data-l10n-id="key")? I think we use the same library in Pontoon Intro as in (some version of) Gaia. It's L20n with .properties file format. AFAIK, we allow empty translations in Gaia.
Flags: needinfo?(stas)
Comment 2•10 years ago
|
||
This was fixed in bug 1132038 :) Can you update l10n.js to a more recent version of the v2.x branch? 2.0.2 will do, 2.0.5 is the most recent as of this writing:
https://github.com/l20n/l20n.js/blob/v2.x/dist/web/l10n.js
You can also use npm or bower.
Flags: needinfo?(stas)
Comment 3•10 years ago
|
||
Commits pushed to master at https://github.com/mozilla/pontoon
https://github.com/mozilla/pontoon/commit/20685eda63f48c8b982ace89e3d4c6884fe21e93
Bug 1198610: Allow saving empty translations in place
Store empty translations as '' and untranslated strings as null.
https://github.com/mozilla/pontoon/commit/a126a77b0ee42404c784879dddab8c05bdf84e02
Merge pull request #144 from mathjazz/empty-translations-inplace
Bug 1198610: Allow saving empty translations in place
| Reporter | ||
Comment 4•10 years ago
|
||
Is this update live on prod now? I still get "SAME TRANSLATION ALREADY EXISTS" error on Pootle.
| Assignee | ||
Comment 5•10 years ago
|
||
It wasn't, now it is. Empty translations are now empty in page, too:
https://pontoon.mozilla.org/zh-tw/pontoon-intro/
Please check.
Stas's thanks, I still need to update the lib.
| Reporter | ||
Comment 6•10 years ago
|
||
Looks good on pootle now, closing this bug.
btw, where can I find the production page of this intro?
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 7•10 years ago
|
||
In theory, production site is what is loaded inside Pontoon iframe:
https://pontoon.mozilla.org/intro/
But nobody knows the URL, so Pontoon homepage loaded in your language is much more important:
https://pontoon.mozilla.org/
Assignee: nobody → m
| Reporter | ||
Comment 8•10 years ago
|
||
I see, just thought there was a separate page.
Thank you, Matjaz and Stas!
Updated•4 years ago
|
Product: Webtools → Webtools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•