Separate string needed for "Sign in" header #3128
Comments
|
@splewako - We want to understand the request better because cross-language nuances are hard to comprehend when your native language doesn't have the concept. Is "Sign in" in the header is different to "Sign in" when used as an imperative, like on the button? |
Yes, as general rule imperative strings shouldn't be used as titles/headers, some locales use nouns for titles, and verbs for actions (for example button labels). This may not be that visible on a webpage but for example in Firefox OS we often have different forms for settings item label (first) activating settings view with some title/header (second) and submit button (third) while en-US has only one form. |
|
Thanks @splewako - do you know of any resources where we could find out more about best practices? |
|
https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_content_best_practices Asking l10n-drivers team or on #l10n irc channel would be also good idea. |
|
@mathjazz did you ever have to deal with this type of issue? |
|
Yeah, title and button should be separate strings. You will have to use msgctxt to have two different entries with the same msgid in the PO file: |
|
@zaach @shane-tomlinson we need to chat about getting the context value into our strings. @zaach for .mustache templates does this make sense: before: after: This should extract as: I'm not sure what to do with Ideas? |
|
It looks like there's an open jsxgettext issue for contexts: Ref: On Wed, Nov 11, 2015 at 11:29 AM, Vlad Filippov notifications@github.com
Zach Carter |
|
We need to patch everything for this. https://github.com/zaach/jsxgettext-recursive should be looking for handlebars attributes. pass them on to the templates and we also need to adjust our translation function to make sure it picks up the right string based on its context (from json??) |
|
from talking to @zaach: for
For js strings , we need to add another helper for strings that have context and it might look like something like this:
|
Second, are we 100% positive |
xgettext-like tools will expect a string literal. |
|
Another contributor sent a related message to this: |
Use a triple / (///) to give a `t` a context that will be used as a comment for the l10n team. issue #3128
Use a triple / (///) to give a `t` a context that will be used as a comment for the l10n team. issue #3128
|
|
https://github.com/mozilla/fxa-content-server/blob/master/app/scripts/templates/sign_in.mustache#L4-L10
Polish and some other languages use different form for active elements like buttons and links than for headers or titles.
The text was updated successfully, but these errors were encountered: