Closed
Bug 1223014
Opened 10 years ago
Closed 10 years ago
Doc status pages should display status of macro string localization
Categories
(Developer Documentation Graveyard :: Macros/Templates, defect, P5)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: fs, Assigned: sphinx_knight)
References
()
Details
Attachments
(1 file)
86 bytes,
patch
|
fs
:
review+
|
Details | Diff | Splinter Review |
:: Developer Documentation Request
Request Type: New Documentation
Gecko Version: unspecified
Technical Contact: fscholz@mozilla.com
:: Details
Currently, the doc status page for a given locale does only display the status of the article translation: https://developer.mozilla.org/de/docs/MDN/Doc_status/CSS
To encourage localization of the strings that we are using in macro scripts and "databases", we should add status of the "L10n:__" macros to the status pages. For CSS, e.g. there are two macros that should be included all CSS doc status page of the locales:
I see this as a table. E.g. French CSS doc status page:
L10n:CSS | 42 strings | 21 translated
L10n:CSSData | 160 strings | 150 translated
To do this the LocalizationStatusInSection macro likely needs a new array parameter with the info of which macros belong to the area (CSS here): ["L10n:CSS", "L10n:CSSData"].
Hopefully this will make the things to translate more visible to localizers.
I'll have a look for this seems pretty doable (even for someone rusty like me). I'll take the bug for now and hope to complete it soon.
Attachment #8685941 -
Flags: review?(fscholz)
Comment 3•10 years ago
|
||
Even when you didn't add me as reviewer, I think it looks good from a first glance.
What could additionally be check is whether the strings are actually translated, because it sometimes happens that the English strings are just copied. Though this may result in false positives when the localized string is indeed the same as the English one.
Also I am wondering, should strings actually be translated when they are the same in your language? E.g. the word 'Element' is the same in English as in German. Should the German one be created, nontheless?
Sebastian
Reporter | ||
Comment 4•10 years ago
|
||
Comment on attachment 8685941 [details] [diff] [review]
Macro proposed to solve this bug
Looks good to me. r+
(In reply to Sebastian Zartner [:sebo] from comment #3)
> Even when you didn't add me as reviewer, I think it looks good from a first
> glance.
>
> What could additionally be check is whether the strings are actually
> translated, because it sometimes happens that the English strings are just
> copied. Though this may result in false positives when the localized string
> is indeed the same as the English one.
>
> Also I am wondering, should strings actually be translated when they are the
> same in your language? E.g. the word 'Element' is the same in English as in
> German. Should the German one be created, nontheless?
>
> Sebastian
I think it is fine for now. Checking for copied strings and the "Element == Element" problem look like conflicting problems to me, so I think we wouldn't want to add additional checks for now.
We could also check for empty strings, but I think these improvements will come naturally over time once people actually use this to do the translations.
Thanks for the work!
Attachment #8685941 -
Flags: review?(fscholz) → review+
Comment 5•10 years ago
|
||
I am wondering whether having the localizations in substructures would cause trouble. Please see bug 1219909 comment 2 and the related L10n:CompatTable template.
Sebastian
As said in bug 1219909, I think we should stick to the same structure.
Regarding https://bugzilla.mozilla.org/show_bug.cgi?id=1223014#c3, I think that if the strings is identical in the locale, it should be added anyway. (one could think of a placeholder like %ok% or the like to indicate the string is the same than in English but this doesn't seem high priority for me)
Fixed with https://developer.mozilla.org/en-US/docs/Template%3ALocalizationStatusInSection$revision/948391
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Comment 8•10 years ago
|
||
The status pages don't show the new info yet, because the macro calls on the different pages don't include the macro array yet.
I see two solutions for this:
1. Create a new bug that covers the update of the status pages
2. Reopen this bug and include the array of templates within the LocalizationStatusInSection template
I'm for the latter option, because it allows to control the display of the template translation info at a single place. By that we avoid having to edit all the l10n status pages or letting the different pages diverge by not updating them. Especially when we add more l10n templates over time this saves a lot of time.
Florian, what do you think?
Sebastian
Flags: needinfo?(fscholz)
Reporter | ||
Comment 9•10 years ago
|
||
I agree to Sebastian's 2nd proposal. Parameters are a burden as we need to touch all the pages. Actually, we have moved away from parameters with macros a lot in the past.
I didn't thought of this in the first place (sorry), but yes, let's have the available l10n templates in an object in the LocalizationStatusInSection template.
Something like
l10nMacros = {
"CSS": ["CSS", "CSSData"],
"SVG" ["SVG"],
}
and then, depending on which doc status page you are, it chooses the correct ones to display the status.
Sphinx, does this sound doable to you or do you want me or Sebastian to chime in?
The current list is
Template:L10n:Common
Template:L10n:CompatTable
Template:L10n:CSS
Template:L10n:CSSData
Template:L10n:JavaScript
Template:L10n:SVG
For Common, and CompatTable, maybe "MDN"? https://developer.mozilla.org/fr/docs/MDN/Doc_status/MDN ?
Status: RESOLVED → REOPENED
Flags: needinfo?(fscholz) → needinfo?(sphinx_knight)
Resolution: FIXED → ---
Reporter | ||
Comment 10•10 years ago
|
||
<offtopic> we don't have a bug for every template change, but as you see reviewing is actually quite good and should happen. Good example why GitHub PullRequest'ing of templates would bring us a lot in my opinion.</offtopic>
Comment 11•10 years ago
|
||
(In reply to Florian Scholz [:fscholz] (MDN) from comment #10)
> <offtopic> we don't have a bug for every template change, but as you see
> reviewing is actually quite good and should happen. Good example why GitHub
> PullRequest'ing of templates would bring us a lot in my opinion.</offtopic>
I totally agree that template changes should be reviewed. The important thing is to keep the contribution process simple.
Anyway, further discussion of this should happen somewhere else like at https://groups.google.com/forum/#!topic/mozilla.dev.mdc/rPT8vgZdJBk.
Sebastian
Assignee | ||
Comment 12•10 years ago
|
||
OK with me. It makes sense and given the structure of the macro, it should not be difficult to adapt.
I'll take care of that (maybe this week-end if not before)
Status: REOPENED → ASSIGNED
Flags: needinfo?(sphinx_knight)
Assignee | ||
Comment 13•10 years ago
|
||
Done with https://developer.mozilla.org/en-US/docs/Template%3ALocalizationStatusInSection$revision/949205
Status: ASSIGNED → RESOLVED
Closed: 10 years ago → 10 years ago
Resolution: --- → FIXED
Comment 14•10 years ago
|
||
Works for me now.
Just a note: Julien chose to add Common and CompatTable to all pages instead of just showing them for MDN, which is ok for me.
Sebastian
Assignee | ||
Comment 15•10 years ago
|
||
Well, it's because I didn't completely read Florian's comment :s Anyway, I think it's a good incentive to have them everywhere :)
You need to log in
before you can comment on or make changes to this bug.
Description
•