[ca-valencia] Search engine setup for Firefox for Catalan (Valencian)
Categories
(Firefox :: Search, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox71 | --- | fixed |
People
(Reporter: flod, Assigned: flod)
References
Details
Attachments
(1 file)
We want to copy the values from the current 'ca' locale, at least as a start.
Assignee | ||
Comment 1•5 years ago
|
||
I'm trying to write a patch, but so much has changed, and I'm really confused by engines.json. Example:
"included": {
"locales": { "matches": ["br", "fr", "wo"] },
"regions": ["ca"]
},
"webExtensionLocale": "ca"
Why are regions lowercase? More important, why is a region code (CA for Canada) used in a field called webExtensionLocale?
I'm trying to clone the settings for "ca" (Catalan) to "ca-valencia". Is there anything I should update beyond the two JSON files, and the _locales folders inside individual webextensions?
Assignee | ||
Comment 2•5 years ago
|
||
Comment 3•5 years ago
|
||
Why are regions lowercase?
The regions are lowercase because thats how they came from
https://searchfox.org/mozilla-central/source/toolkit/components/mozintl/mozIntl.jsm#176
Maybe its something we should normalise as lowercase when checking but use uppercase in the configation? its definitely been confusing when I couldnt tell which is a locale vs region, but that the same time nice to avoid processing text since we arent using icu or anything to check equality
More important, why is a region code (CA for Canada) used in a field called webExtensionLocale?
We (ab)use the web extension localisation mechanism to distringuish between things that are not necesarrily locales (see https://searchfox.org/mozilla-central/source/browser/components/search/extensions/google/_locales), with the new configuration (engines.json) we are hopeing to move away from that
I'm trying to clone the settings for "ca" (Catalan) to "ca-valencia". Is there anything I should update beyond the two JSON files, and the _locales folders inside individual webextensions?
Nope that should be good, will comment further on phabricator
Assignee | ||
Comment 4•5 years ago
|
||
(In reply to Dale Harvey (:daleharvey) from comment #3)
The regions are lowercase because thats how they came from
https://searchfox.org/mozilla-central/source/toolkit/components/mozintl/mozIntl.jsm#176
Ugh. Unless I'm missing something obvious, that doesn't look right. I'll check with zibi and jfkthame
Maybe its something we should normalise as lowercase when checking but use uppercase in the configation?
I think that would help. I was unlucky to pick Catalan (ca), but I assume there might be other cases.
We (ab)use the web extension localisation mechanism to distringuish between things that are not necesarrily locales (see https://searchfox.org/mozilla-central/source/browser/components/search/extensions/google/_locales), with the new configuration (engines.json) we are hopeing to move away from that
OK, I'll keep an eye out. I will probably reach out in the future, since I need to update our internal documentation.
Comment 5•5 years ago
|
||
The regions are lowercase because thats how they came from
https://searchfox.org/mozilla-central/source/toolkit/components/mozintl/mozIntl.jsm#176
What do you mean "they came from"? This is a list of IDs of region codes.
If you have a field called "region", its value can be in any case, since it is clear that it is a region. If you try to encode a CLDR language identifier (or BCP47 language tag), then you cannot use only the region, it must be preceded by a language to be a valid identifier, for example "und-CA" or "und-FR".
So, from my shallow read, the list of "locales" must conform to BCP47 or CLDR Language Identifier rules, so "ca" is Catalan since it takes the first subtag (language) which can be a two-alpha code.
In the regions
list, ca
is a region name according to ISO3166-1 2-alpha list - Canada [1].
The example:
"included": {
"locales": { "matches": ["br", "fr", "wo"] },
"regions": ["ca"]
},
"webExtensionLocale": "ca"
states that the locales match three languages br
(Breton), fr
(French) and wo
(Wolof), and region is a single item list with a region ca
(Canada) [1].
Then, the second field lists a webExtensionLocale
, which is ca
and that parses to language Catalan.
If that was not the intention, I believe the naming scheme should be updated, or the values should be matching the standards.
[0] https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
[1] https://en.wikipedia.org/wiki/ISO_3166-1
Comment 6•5 years ago
|
||
(In reply to Zibi Braniecki [:zbraniecki][:gandalf] from comment #5)
Then, the second field lists a
webExtensionLocale
, which isca
and that parses to language Catalan.If that was not the intention, I believe the naming scheme should be updated, or the values should be matching the standards.
At the moment, we've maintained the naming of extensions & locales to be consistent with what it was previously (as things like ABSearch make changing them really difficult). Once we're completely on the new modern configuration, we'll have more flexibility, and we should be able to make improvements.
Pushed by flodolo@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fdb95b58fb6c [ca-valencia] Search engine setup for Firefox for Catalan (Valencian) r=daleharvey
Comment 8•5 years ago
|
||
Backed out for build bustages.
Push with failure: https://treeherder.mozilla.org/#/jobs?repo=autoland&selectedJob=266287198&resultStatus=testfailed%2Cbusted%2Cexception&revision=fdb95b58fb6c56f536b96768c8aa0791a7e11dae
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=266287198&repo=autoland&lineNumber=41455
Backout: https://hg.mozilla.org/integration/autoland/rev/d54701f32f28616f8774def4720a32959e9ae849
Assignee | ||
Comment 9•5 years ago
|
||
Sorry, I ran the xpcshell/mochitest locally, but didn't think of duplicates. Looking into removing the duplicate alltogether.
Comment 10•5 years ago
|
||
Pushed by flodolo@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/bf28d9a8dc77 [ca-valencia] Search engine setup for Firefox for Catalan (Valencian) r=daleharvey
Comment 11•5 years ago
|
||
bugherder |
Description
•