"Shared" string table isn't imported

RESOLVED FIXED

Status

()

Firefox for iOS
Build & Test
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: stef, Assigned: st3fan)

Tracking

unspecified
Other
iOS
Dependency tree / graph

Firefox Tracking Flags

(fxios1.1+)

Details

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
Created attachment 8663926 [details]
fx.ios.sendto.png

There seems to be no way to localize "Cancel" and "Firefox on device_name", screen from 1.0.1 but in 1.1 it looks the same.
"Firefox on ..." isn't an in-product string; that's the name of the device.

The cancel button sounds like Bug 1196949. Steph, did that make it to master?
Flags: needinfo?(sleroux)
(Reporter)

Comment 2

3 years ago
(In reply to Richard Newman [:rnewman] from comment #1)
> "Firefox on ..." isn't an in-product string; that's the name of the device.

I didn't name it like that, it needs to be defined somewhere - some sync code maybe?
The 'Cancel' string should now be using the localized string instead of the system button style. Don't think we caught the 'Firefox on...' string though.
Flags: needinfo?(sleroux)
(In reply to Stefan Plewako [:stef] from comment #2)
> (In reply to Richard Newman [:rnewman] from comment #1)
> > "Firefox on ..." isn't an in-product string; that's the name of the device.
> 
> I didn't name it like that, it needs to be defined somewhere - some sync
> code maybe?

Here's how Firefox for iOS does it:


Utils/DeviceInfo.swift
47:        let f = NSLocalizedString("%@ on %@", tableName: "Shared", comment: "A brief descriptive name for this app on this device, used for Send Tab and Synced Tabs. The first argument is the app name. The second argument is the device name.")


My point is that that string is supplied by another device, which presumably was using an English string at the time it first synced.
Duping to the 'Cancel' bug.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1196949
(Reporter)

Comment 6

3 years ago
(In reply to Richard Newman [:rnewman] from comment #4)
> Utils/DeviceInfo.swift
> 47:        let f = NSLocalizedString("%@ on %@", tableName: "Shared",
> comment: "A brief descriptive name for this app on this device, used for
> Send Tab and Synced Tabs. The first argument is the app name. The second
> argument is the device name.")
> 
> My point is that that string is supplied by another device, which presumably
> was using an English string at the time it first synced.

Steps to reproduce:
1. Install Firefox
2. Sign in to sync
3. Force quit Firefox
4. Delete Firefox
5. Repeat steps 1-2

With each iteration one more "Firefox on device name" is added.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
(Reporter)

Updated

3 years ago
Blocks: 1212574
(In reply to Stefan Plewako [:stef] from comment #6)

> With each iteration one more "Firefox on device name" is added.

That's the record added by this device, and one new record each time you do that is currently expected. If you uninstall the app or clear its data, we can't delete the old record, and we haven't implemented Bug 1168690 yet.

The string is an NSLocalizedString, as I pointed out. Can you explain why you reopened this bug, Stef?
Flags: needinfo?(splewako)
(Reporter)

Comment 8

3 years ago
(In reply to Richard Newman [:rnewman] from comment #7)
> (In reply to Stefan Plewako [:stef] from comment #6)
> 
> > With each iteration one more "Firefox on device name" is added.
> 
> That's the record added by this device, and one new record each time you do
> that is currently expected. If you uninstall the app or clear its data, we
> can't delete the old record, and we haven't implemented Bug 1168690 yet.
> 
> The string is an NSLocalizedString, as I pointed out.

I would expect that new records take localized/NSLocalizedString value and clearly they don't.
Flags: needinfo?(splewako)
This string is in tableName: "Shared".

I see in the Polish import:

BookmarkPanel.strings		HistoryPanel.strings		Localizable.strings		Storage.strings
ClearPrivateData.strings	InfoPlist.strings		PrivateBrowsing.strings
ErrorPages.strings		Intro.strings			Search.strings


That implies that we're missing a whole table.
tracking-fxios: --- → ?
Component: General → Build & Test
Flags: needinfo?(sarentz)
Summary: Two hardcoded strings in send tab extension → "Shared" string table isn't exported
Assignee: nobody → sarentz
Status: REOPENED → ASSIGNED
tracking-fxios: ? → 1.1+
Flags: needinfo?(sarentz)
Summary: "Shared" string table isn't exported → "Shared" string table isn't imported
(Assignee)

Comment 10

3 years ago
We do not correctly import the localized 'Shared' strings. Will be fixed today and will show up in an L10N build later today.
(Assignee)

Comment 11

3 years ago
Because we are passed string freeze the Cancel button will have to be the iOS provided Cancel button instead of a custom localized one.
(Assignee)

Comment 12

3 years ago
Fixed with https://github.com/mozilla/firefox-ios/commit/30297f1e6929e81a14c4f4c9e7e9335212dc7245

To test:

* Make sure your device is set to the correct locale
* Clear all data ro do a clean install
* Open some tabs
* Login to sync
* Sync your tabs by opening the remote tabs panel
* Go to your desktop, see that the title of the device in "History -> Tabs from Other Devices" is localized
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.