Closed Bug 1831909 Opened 2 years ago Closed 1 years ago

[meta] OpenPGP strings with poor pluralization

Categories

(MailNews Core :: Security: OpenPGP, defect, P2)

Thunderbird 115

Tracking

(thunderbird_esr102 wontfix)

RESOLVED WORKSFORME
116 Branch
Tracking Status
thunderbird_esr102 --- wontfix

People

(Reporter: rjl, Unassigned)

References

Details

(Whiteboard: [snnot3p])

messagecomposer.ftl has some strings that can't be translated into some languages because of poor use of plurals.

https://firefox-source-docs.mozilla.org/l10n/fluent/review.html#variants-and-plurals

Need plurals

  • openpgp-key-issue-notification-many
  • smime-cert-issue-notification-many

Split into multiple strings
This needs two strings, one for the case of 1 public recipient, and a plural string that handles > 1.

  • many-public-recipients-notice

An example from browser:

https://searchfox.org/mozilla-central/rev/4e6970cd336f1b642c0be6c9b697b4db5f7b6aeb/browser/locales/en-US/browser/tabbrowser.ftl#70-76

# The singular form is not considered since this string is used only for multiple tabs.
# Variables:
#   $tabCount (Number): The number of tabs that will be closed.
tabbrowser-confirm-close-tabs-title =
    { $tabCount ->
       *[other] Close { $tabCount } tabs?
    }

Addon-fix:
openpgp-key-issue-notification-one
This string is missing a period at the end of the sentence. It should align with the other strings in this section which all have one. This does change the string enough that a new ID is going to be needed.

Version: unspecified → Thunderbird 115

looking...

Assignee: nobody → elizabeth

Rob, does this need to be fixed by May 11 ?

Flags: needinfo?(rob)

Before 115 goes to beta. I suspect we'll be able to migrate some of these. Once you've identified what the new Fluent code will be, NI? me about a script.

Severity: -- → S3
Flags: needinfo?(rob)
Priority: -- → P2

I'm going to add another to this bug:
messenger.ftl - decrypt-and-copy-failure

# Variables:
# $failures (Number) - Number of messages that could not be decrypted.
# $total (Number) - Total number of messages that were attempted to be decrypted.
decrypt-and-copy-failures = { $failures } of { $total } messages could not be decrypted and were not copied.

This needs plurals based on $total.

Also needing plurals in mail/messenger/openpgp/keyWizard.ftl:

  • openpgp-keygen-days-label
  • openpgp-keygen-months-label
  • openpgp-keygen-years-label
Summary: Compose window strings with poor pluralization → OpenPGP strings with poor pluralization

Making this a meta bug so things can get fixed more quickly.

Summary: OpenPGP strings with poor pluralization → [meta] OpenPGP strings with poor pluralization
Depends on: 1833168
Assignee: elizabeth → nobody

(In reply to Rob Lemley [:rjl] from comment #0)

Split into multiple strings
This needs two strings, one for the case of 1 public recipient, and a plural string that handles > 1.

  • many-public-recipients-notice

The current code is the following. Has this already been fixed?

#   $count (Number) - the count of addresses in the "To" and "Cc" fields.
many-public-recipients-notice = { $count ->
  [one] Your message has a public recipient. You can avoid disclosing recipients by using Bcc instead.
  *[other] The { $count } recipients in To and Cc will see each other’s address. You can avoid disclosing recipients by using Bcc instead.
}

Rob is checking in on how to handle pluralization when we are doing something special for a single case (see phabricator comment.) Pluralization related updates are on hold for now.

As mentioned in D178066, there's no guarantee that the [one] variant or any variant will be present for a given locale. So the singular case needs to be a separate string and then a plural string with only [other] variant.

Some more in openpgp.ftl:

  • openpgp-key-gen-days-label
  • openpgp-key-gen-months-label
  • openpgp-key-gen-years-label

I'll note that 1 day/month/year is an accepted value, so a plural with [1] and [other] variants should suffice.

Those are actually not in use. Will file a bug.

Component: Message Compose Window → Security: OpenPGP
Product: Thunderbird → MailNews Core
Depends on: 1833762
Depends on: 1834598
Depends on: 1834599
Whiteboard: [snnot3p]

Are plurals still needed for the below?:
(In reply to Rob Lemley [:rjl] from comment #4)

Also needing plurals in mail/messenger/openpgp/keyWizard.ftl:

  • openpgp-keygen-days-label
  • openpgp-keygen-months-label
  • openpgp-keygen-years-label

The following translations were addressed in bug 1833762 by being removed, as they were not in use.
(In reply to Rob Lemley [:rjl] from comment #9)

Some more in openpgp.ftl:

  • openpgp-key-gen-days-label
  • openpgp-key-gen-months-label
  • openpgp-key-gen-years-label

I'll note that 1 day/month/year is an accepted value, so a plural with [1] and [other] variants should suffice.

The other translation updates have been addressed.

(In reply to Elizabeth Mitchell from comment #11)

Are plurals still needed for the below?:
(In reply to Rob Lemley [:rjl] from comment #4)

Also needing plurals in mail/messenger/openpgp/keyWizard.ftl:

  • openpgp-keygen-days-label
  • openpgp-keygen-months-label
  • openpgp-keygen-years-label

Those are correct. They are used directly as items in a menu. https://searchfox.org/comm-central/rev/1924a0c102a4d3a75af572a16336e4b8056d0d3f/mail/extensions/openpgp/content/ui/keyWizard.xhtml#252,259,265

(In reply to Magnus Melin [:mkmelin] from comment #12)

(In reply to Elizabeth Mitchell from comment #11)

Are plurals still needed for the below?:
(In reply to Rob Lemley [:rjl] from comment #4)

Also needing plurals in mail/messenger/openpgp/keyWizard.ftl:

  • openpgp-keygen-days-label
  • openpgp-keygen-months-label
  • openpgp-keygen-years-label

Those are correct. They are used directly as items in a menu. https://searchfox.org/comm-central/rev/1924a0c102a4d3a75af572a16336e4b8056d0d3f/mail/extensions/openpgp/content/ui/keyWizard.xhtml#252,259,265

I think we can close this then. All items have been addressed. Thank you! Please reopen if I missed something.

Status: NEW → RESOLVED
Closed: 1 years ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch

=> WFM because it doesn't have a patch

Resolution: FIXED → WORKSFORME
You need to log in before you can comment on or make changes to this bug.