Skip to content
This repository has been archived by the owner on Sep 3, 2018. It is now read-only.

Open Questions for Pontoon #34

Closed
6 tasks done
MichaelKohler opened this issue Jul 18, 2018 · 7 comments
Closed
6 tasks done

Open Questions for Pontoon #34

MichaelKohler opened this issue Jul 18, 2018 · 7 comments
Assignees
Labels
question Further information is requested

Comments

@MichaelKohler
Copy link
Owner

MichaelKohler commented Jul 18, 2018

  • Do we need to provide an EN-copy/empty locale.ftl for new languages? Do we need to request them or can Pontoon be enabled for all locales and we get what we get?
  • If there are new EN strings, do they need to be added the same way to the other locale files or does Pontoon pick them up and offers them for translation? How can we handle language fallback of a single string if we don't add to the other locales ftl files without having fallbacks in the HTML as in https://github.com/projectfluent/fluent.js/blob/master/fluent-react/examples/fallback-sync/src/App.js#L20? If not, is there a way to automatically do the placeholder fallbacks (so we don't need to change the placeholder and the EN string if we change something?)
  • If there is a string change, does Pontoon pick it up or do we need to modify the key for it to be picked up?
  • What do we need to enable for Pontoon to work?
  • Is there anything special to notice when using Pontoon with Fluent?
  • Is there a GitHub bot that posts issues once a language has >X% translations?
@MichaelKohler
Copy link
Owner Author

Asked @mathjazz on Slack #pontoon to provide answers here.

@mathjazz
Copy link

Do we need to provide an EN-copy/empty locale.ftl for new languages? Do we need to request them or can Pontoon be enabled for all locales and we get what we get?

You don't need to make any changes in the repository. You can enable the locale in the Pontoon Admin and Pontoon will create files as needed. You can also enable all locales from the beginning, but we usually don't do that.

If there are new EN strings, do they need to be added the same way to the other locale files or does Pontoon pick them up and offers them for translation?

No, you only add them to EN files.

How can we handle language fallback of a single string if we don't add to the other locales ftl files without having fallbacks in the HTML as in https://github.com/projectfluent/fluent.js/blob/master/fluent-react/examples/fallback-sync/src/App.js#L20? If not, is there a way to automatically do the placeholder fallbacks (so we don't need to change the placeholder and the EN string if we change something?)

@stasm?

If there is a string change, does Pontoon pick it up or do we need to modify the key for it to be picked up?

If you modify the key, it will be treated as a new string (untranslated for all locales). If you only update the string, translations will be kept and string will keep showing up as translated.

See: https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_content_best_practices#Changing_existing_strings

What do we need to enable for Pontoon to work?

You need to take care of Step A:
https://developer.mozilla.org/en-US/docs/Mozilla/Implementing_Pontoon_in_a_Mozilla_website

Is there anything special to notice when using Pontoon with Fluent?

Translation UI will be different:
https://mozilla-l10n.github.io/localizer-documentation/tools/pontoon/ui.html

Is there a GitHub bot that posts issues once a language has >X% translations?

No. You could use an API call like this:
https://pontoon.mozilla.org/graphql?query={project(slug:%22sumo%22){localizations{locale{code}complete}}}

@MichaelKohler
Copy link
Owner Author

That's great to hear. Thanks a lot for these answers!

@stasm
Copy link

stasm commented Jul 19, 2018

How can we handle language fallback of a single string if we don't add to the other locales ftl files without having fallbacks in the HTML as in https://github.com/projectfluent/fluent.js/blob/master/fluent-react/examples/fallback-sync/src/App.js#L20? If not, is there a way to automatically do the placeholder fallbacks (so we don't need to change the placeholder and the EN string if we change something?)

I'm not sure if I understand the question. I see that you have a changeLocales action creator which performs language negotiation with { defaultLocale: 'en-US' }. This means that the en-US copy is the ultimate runtime fallback. There's not need to put the English copy inside of JSX if you don't want to. The main motivation for doing so is https://github.com/hkasemir/fluent-react-pull-strings which is still a WIP, I believe.

As long as your English .ftl has the new string, the runtime fallback will work fine. Does this answer your question?

The action creator will fetch both the current user's language and en-US. I'm working on making the fallback async in projectfluent/fluent.js#100. The next version of fluent-react should ship with this feature.

@stasm
Copy link

stasm commented Jul 19, 2018

P.S. Thanks for using fluent-react! 🎉

@MichaelKohler
Copy link
Owner Author

As long as your English .ftl has the new string, the runtime fallback will work fine. Does this answer your question?

I'll test again, last time I tested it didn't show anything. Could very well be that I did something wrong. Will report back! Thanks to you for the answer as well. This is great support :)

@MichaelKohler
Copy link
Owner Author

As long as your English .ftl has the new string, the runtime fallback will work fine. Does this answer your question?

I guess I did something wrong there, works like a charm.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants