Closed
Bug 1162510
Opened 10 years ago
Closed 10 years ago
Sync.strings are not imported
Categories
(Firefox for iOS :: Build & Test, defect)
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
fennec | + | --- |
People
(Reporter: st3fan, Assigned: st3fan)
References
Details
Attachments
(1 file)
There is a new <file> section in the XLIFF files that is not correctly imported:
<file original="Sync.strings" ...
This string comes from DeviceInfo.swift, which is part of the Shared target. (Which is a framework that we share to other components)
NSLocalizedString("%@ on %@", tableName: "Sync", ...
Oddly in this case Xcode does not prefix the original file name in the XLIFF with the target name like it does for other strings.
For example in the SendTo extension, which is also a separate target, we have
NSLocalizedString(..., tableName: "SendTo", ...)
Which results in a <file> section in the XLIFF that looks like:
<file original="Extensions/SendTo/SendTo.strings" ...
Which the import scripts can than automatically detect and map to the right target-specific destination directory.
I am at loss as to why Xcode does not do this for the string in Shared. Its behaviour is all so random it seems :-(
In any case, we need some workaround. I could special case it in the import scripts, or maybe we can try to change the tablename to Shared or maybe remove it to see what the resulting XLIFF looks like then.
Assignee | ||
Comment 1•10 years ago
|
||
If i remove the table name, the string is merged into Client/Localizable.strings
If I change it to "Shared", the destination is "Shared.strings"
If I change it to "Shared/Sync", the string export fails.
From a packaging perspective I think it is best if localized strings are packaged in the framework that contains the code with the actual NSLocalizedString() in it. That is what we've been trying to do with the others. So I think that means I would prefer to change the tableName to "Shared" and then in the import-strings.py script we can do a quick special case to write this out to the right place.
Comment 2•10 years ago
|
||
Changing to "Shared" is totally fine by me.
Assignee | ||
Comment 3•10 years ago
|
||
This is a fix for the Sync.strings files not being included in a strings import. It also includes a fix for a dependend bug that gives the Shared target a more traditional place in the project. See bug 1162609 for details.
Attachment #8602820 -
Flags: review?(rnewman)
Assignee | ||
Updated•10 years ago
|
Attachment #8602820 -
Flags: review?(francesco.lodolo)
Updated•10 years ago
|
Attachment #8602820 -
Flags: review?(francesco.lodolo) → review+
Updated•10 years ago
|
Attachment #8602820 -
Flags: review?(rnewman) → review+
Assignee | ||
Updated•10 years ago
|
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•