Closed Bug 1046552 Opened 10 years ago Closed 10 years ago

[Settings] The conflict warning string is difficult to localize (string reusage)

Categories

(Firefox OS Graveyard :: Gaia::Settings, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: arthurcc, Assigned: arthurcc, Mentored)

References

Details

(Keywords: l12y, Whiteboard: [good first bug])

Attachments

(1 file)

The string, is-warning-message=Enabling {{newSetting}} will disable {{oldSetting}}. Do you want to enable {{newSetting}}, is difficult to be localized. We should enumerate all possible combinations in the localization file.
Title: "is-warning-head" is using the name of the pref. Can we use a generic title good for all variants? For example "Attention", or "Conflicting settings".

Message: how many variants are there? I count 6

1. Enabling USB storage will disable USB tethering. Do you want to enable USB storage?
2. Enabling USB storage will disable Wi-Fi hotspot. Do you want to enable USB storage?

3. Enabling USB tethering will disable USB storage. Do you want to enable USB tethering?
4. Enabling USB tethering will disable Wi-Fi hotspot. Do you want to enable USB tethering?

5. Wi-Fi hotspot will disable USB storage. Do you want to enable Wi-Fi hotspot?
6. Wi-Fi hotspot will disable USB tethering. Do you want to enable Wi-Fi hotspot?

I wonder also if we could go down to 3 variants: example, 

1+2 Enabling USB storage will disable USB tethering and Wi-Fi hotspot. Do you want to enable USB storage?

Localizers can work around the current limitation, but that makes sense only with a large amount of strings. That's why I asked if the plan was to use this in other contexts.
Keywords: l12y
Summary: [Settings] The conflict warning string is unable to be localized → [Settings] The conflict warning string is difficult to localize (string reusage)
(In reply to Francesco Lodolo [:flod] from comment #1)
> Title: "is-warning-head" is using the name of the pref. Can we use a generic
> title good for all variants? For example "Attention", or "Conflicting
> settings".
> 
> Message: how many variants are there? I count 6
> 
> 1. Enabling USB storage will disable USB tethering. Do you want to enable
> USB storage?
> 2. Enabling USB storage will disable Wi-Fi hotspot. Do you want to enable
> USB storage?
> 
> 3. Enabling USB tethering will disable USB storage. Do you want to enable
> USB tethering?
> 4. Enabling USB tethering will disable Wi-Fi hotspot. Do you want to enable
> USB tethering?
> 
> 5. Wi-Fi hotspot will disable USB storage. Do you want to enable Wi-Fi
> hotspot?
> 6. Wi-Fi hotspot will disable USB tethering. Do you want to enable Wi-Fi
> hotspot?
> 
> I wonder also if we could go down to 3 variants: example, 
> 
> 1+2 Enabling USB storage will disable USB tethering and Wi-Fi hotspot. Do
> you want to enable USB storage?
> 
> Localizers can work around the current limitation, but that makes sense only
> with a large amount of strings. That's why I asked if the plan was to use
> this in other contexts.

Currently this is the only use case, so let's add all variants as you suggested.

Only USB storage and USB tethering, USB tethering and Wi-Fi hotspot are mutual exclusive, thus there are four variants in total:

1. Enabling USB storage will disable USB tethering. Do you want to enable USB storage?
2. Enabling USB tethering will disable USB storage. Do you want to enable USB tethering?
3. Enabling USB tethering will disable Wi-Fi hotspot. Do you want to enable USB tethering?
4. Enabling Wi-Fi hotspot will disable USB tethering. Do you want to enable Wi-Fi hotspot?
Mentor: arthur.chen
Whiteboard: [good first bug]
is-warning-message is already localized but is-warning-head is not. So should we need to work on is-warning-head to improve it to make it more reusable?
> is-warning-head={{newSetting}}

This means that the text changes for each setting, and display the specific setting's name. That's the only part that works fine.
Assignee: nobody → arthur.chen
Status: NEW → ASSIGNED
Achal, it seems that you are working on this, isn't it? Just like to check the status as we are going to branch next week. Let me know if you need any help!
Flags: needinfo?(theachalaggarwal)
Hi EJ, flod, would you mind check this patch? Thanks!
Attachment #8481215 - Flags: review?(ejchen)
Attachment #8481215 - Flags: feedback?(francesco.lodolo)
Comment on attachment 8481215 [details]
link to https://github.com/mozilla-b2g/gaia/pull/23475

The patch looks fine (wrong bug reference in the PR/Commit).

Left a question on the PR, mainly for curiosity since the patch works fine.
Attachment #8481215 - Flags: feedback?(francesco.lodolo) → feedback+
Thanks.

master: c7b8e74c972990750fb40c33b646b50a08c9fd40
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Flags: needinfo?(theachalaggarwal)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: