Closed
Bug 1219909
Opened 9 years ago
Closed 9 years ago
Create a L10n:CompatTable JSON template and move strings from EmbedCompatTable into it
Categories
(Developer Documentation Graveyard :: Macros/Templates, defect, P5)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: fs, Assigned: sebo)
References
()
Details
:: Developer Documentation Request
Request Type: New Documentation
Gecko Version: unspecified
Technical Contact:
:: Details
https://developer.mozilla.org/en-US/docs/Template:EmbedCompatTable contains a langDictionary with a lot of strings.
These strings should be in a separate macro like e.g. the one we have for CSS: https://developer.mozilla.org/en-US/docs/Template:L10n:CSS
New macro could be: https://developer.mozilla.org/en-US/docs/Template:L10n:CompatTable
In addition, mdn.replacePlaceholders() instead of the substitiute() function for replacing
placeholders within strings could be used for consistency.
This is not urgent, but will avoid potential conflicts when further developing the EmbedCompatTable macro.
It will make things easier to find and to maintain for localizers.
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → sebastianzartner
Assignee | ||
Comment 1•9 years ago
|
||
I created the L10n:CompatTable template (currently keeping the sub-structures).
EmbedCompatTable still needs to be connected with the l10n template.
Sebastian
Assignee | ||
Comment 2•9 years ago
|
||
Florian, should we keep the substructures from langDictionary in L10n:CompatTable or should the structure be flattened?
E.g. currently there is a 'browserTypes' substructure:
{
// Browser Types
"browserTypes": {
"desktop": {
"en-US": "Desktop",
"de" : "Desktop",
"fr": "Ordinateur"
},
"mobile": {
"en-US": "Mobile",
"de" : "Mobile",
"fr": "Mobile"
},
"non": {
"en-US": "Non-Browser Environment",
"de" : "Nicht-Browser-Umgebung"
}
}
}
Flattened it would look something like this:
{
// Browser Types
"browserTypeDesktop": {
"en-US": "Desktop",
"de" : "Desktop",
"fr" : "Ordinateur"
},
"browserTypeMobile": {
"en-US": "Mobile",
"de" : "Mobile",
"fr" : "Mobile"
},
"browserTypeNon": {
"en-US": "Non-Browser Environment",
"de" : "Nicht-Browser-Umgebung"
}
}
Flattening the structure would make it easier to get the localization status (bug 1223014). The adjustments required for the EmbedCompatTable template would probably be relatively small.
Sebastian
Assignee | ||
Updated•9 years ago
|
Flags: needinfo?(fscholz)
Reporter | ||
Comment 3•9 years ago
|
||
Yes, we want the same data structure for l10n in all macros.
(If it is this structure in the long run, we don't know yet, but for now we should have it consistent)
Flags: needinfo?(fscholz)
I would go for a flat structure too, other localization file formats use such flat structure and migrating (in a distant future) would be easier this way.
Assignee | ||
Comment 5•9 years ago
|
||
Flattened the structure of L10n:CompatTable:
https://developer.mozilla.org/en-US/docs/Template%3AL10n%3ACompatTable$revision/948405
Changed EmbedCompatTable to use the strings from L10n:CompatTable:
https://developer.mozilla.org/en-US/docs/Template%3AEmbedCompatTable$revision/948465
Sebastian
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Summary: Create a L10n:CompatTable json macro and move strings from EmbedCompatTable into it → Create a L10n:CompatTable JSON template and move strings from EmbedCompatTable into it
You need to log in
before you can comment on or make changes to this bug.
Description
•