Open Bug 1392423 Opened 8 years ago Updated 7 years ago

[compare-locales] nested directories in [[paths]] are order-dependent

Categories

(Localization Infrastructure and Tools :: compare-locales, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

People

(Reporter: Pike, Unassigned)

Details

Attachments

(1 obsolete file)

In a l10n.toml context, I found that [[paths]] reference = "browser/locales/en-US/**" l10n = "{l}browser/**" [[paths]] reference = "browser/extensions/onboarding/locales/en-US/**" l10n = "{l}browser/extensions/onboarding/**" and [[paths]] reference = "browser/extensions/onboarding/locales/en-US/**" l10n = "{l}browser/extensions/onboarding/**" [[paths]] reference = "browser/locales/en-US/**" l10n = "{l}browser/**" don't produce the same result. The problem is that on the l10n side, browser/** picks up browser/extensions/onboarding/foo. Not sure how to fix this yet. We could try to sort paths, or we need to define ordering in [[paths]]. flod, any opinion? Gonna attach a simpler test case in a minute.
Flags: needinfo?(francesco.lodolo)
(In reply to Axel Hecht [:Pike] from comment #0) > The problem is that on the l10n side, browser/** picks up > browser/extensions/onboarding/foo. > > Not sure how to fix this yet. We could try to sort paths, or we need to > define ordering in [[paths]]. > > flod, any opinion? Sorting paths seems quite brittle. These are both acceptable paths, aren't they? "browser/**" "browser/**/onboarding/locales/en-US/**" Since we're already imposing an order on filters, I guess it would make sense to have a similar thing for paths.
Flags: needinfo?(francesco.lodolo)
(In reply to Francesco Lodolo [:flod] from comment #2) > > Since we're already imposing an order on filters, I guess it would make > sense to have a similar thing for paths. I just recently removed a patch with tests I had lying around, 'cause I think it's OK to just assume that the configuration files are written with this in mind. Is that what your comment means, too?
I think I meant that we should call out that paths will be evaluated in order, like it happens for filters. So broader paths should go at the end of the list. [[paths]] reference = "browser/extensions/onboarding/locales/en-US/**" l10n = "{l}browser/extensions/onboarding/**" [[paths]] reference = "browser/locales/en-US/**" l10n = "{l}browser/**"
Attachment #8899591 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: