Closed
Bug 1140005
Opened 10 years ago
Closed 10 years ago
Localized Info.plist contains placeholders like PRODUCT_NAME and MOZ_DISPLAY_NAME
Categories
(Firefox for iOS :: General, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: st3fan, Unassigned)
References
Details
Attachments
(1 file)
This is in the xliff file:
<file original="Client/Info.plist" source-language="en" datatype="plaintext" target-language="it">
<header>
<tool tool-id="com.apple.dt.xcode" tool-name="Xcode" tool-version="6.1.1" build-num="6A2008a"/>
</header>
<body>
<trans-unit id="CFBundleDisplayName">
<source>$(MOZ_BUNDLE_DISPLAY_NAME)</source>
<target>$(MOZ_BUNDLE_DISPLAY_NAME)</target>
</trans-unit>
<trans-unit id="CFBundleName">
<source>$(PRODUCT_NAME)</source>
<target>$(PRODUCT_NAME)</target>
</trans-unit>
<trans-unit id="CFBundleShortVersionString">
<source>1.0</source>
<target>1.0</target>
</trans-unit>
</body>
</file>
These placeholders are 'compiled' by Xcode when the product is packaged. We use them to dynamically change the bundle identifier and the product display name (Firefox vs Fennec Aurora, etc.).
I noticed that my localized build appears on my home screen as $(MOZ_DISPLAY_NAME) so there is obviously something not going right there.
Couple of notes:
* Ideally these placeholders do not appear in the xliff export at all. Since they do not need to be localized and we manage them in the build scripts.
* Do we actually need to localize all the Info.plist files?
* In the main Info.plist we only have NSLocationWhenInUseUsageDescription that is shown in a dialog when we ask for the location permission. Can we just localize that string?
It is entirely possible that we need to manually add and manage Client/en.lproj/InfoPlist.strings ...
Reporter | ||
Comment 1•10 years ago
|
||
There is no easy fix here. The solution is to pre-process the xliff files that are in the l10n repository before we import them into the Xcode project.
We need to look at all <file> sections for Info.plist files and remove the strings that have either $(MOZ_BUNDLE_DISPLAY_NAME) or $(PRODUCT_NAME) as their value. We should simply remove the whole <trans-unit> node. If this is done for the Client/Info.plist one then the OS will simply default to the values that are in the actual Info.plist file, which has the proper substituted values. (Firefox, Fennec, Aurora)
Reporter | ||
Comment 2•10 years ago
|
||
As an additional step, we can then actually safely remove all <file> sections that reference an Info.plist file for which only the CFBundleDisplayName, CFBundleName and CFBundleShortVersionString strings are defined.
There is no need for those files if they just contain what is alredy in the actual Info.plist file.
Reporter | ||
Comment 3•10 years ago
|
||
Script to pre-process XLIFF files before we can import them in the project. This is to fix the issue where $(PLACEHOLDER) values from the Info.plist end up in localied files.
Attachment #8587641 -
Flags: feedback?(nalexander)
Reporter | ||
Updated•10 years ago
|
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Comment 4•10 years ago
|
||
Comment on attachment 8587641 [details] [review]
PR: https://github.com/mozilla/firefox-ios/pull/299
Hey, sorry I was late to this party -- looks fine.
Attachment #8587641 -
Flags: feedback?(nalexander) → feedback+
You need to log in
before you can comment on or make changes to this bug.
Description
•