Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(@aws-amplify/aws-amplify-react): Improve french translations #5166

Merged
merged 4 commits into from
May 11, 2020
Merged

fix(@aws-amplify/aws-amplify-react): Improve french translations #5166

merged 4 commits into from
May 11, 2020

Conversation

ChristopheBougere
Copy link
Contributor

Description of changes:

Just improved or added a bunch of french translations.
I must say that it is quite a cumbersome task, and I probably missed some of them because there is no official list of all translations. There are some dynamic strings, or messages depending on thrown Error that makes it very difficult to anticipate everything. I already filed this as a feature request in #3092

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@codecov
Copy link

codecov bot commented Mar 22, 2020

Codecov Report

Merging #5166 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #5166   +/-   ##
=======================================
  Coverage   73.60%   73.60%           
=======================================
  Files         203      203           
  Lines       11879    11879           
  Branches     2325     2239   -86     
=======================================
  Hits         8743     8743           
- Misses       2954     2974   +20     
+ Partials      182      162   -20     
Impacted Files Coverage Δ
packages/auth/src/OAuth/OAuth.ts 48.12% <0.00%> (ø)
packages/core/src/Credentials.ts 31.48% <0.00%> (ø)
packages/analytics/src/Analytics.ts 64.81% <0.00%> (ø)
packages/datastore/src/sync/outbox.ts 25.00% <0.00%> (ø)
packages/datastore/src/storage/storage.ts 67.59% <0.00%> (ø)
packages/core/src/OAuthHelper/GoogleOAuth.ts 32.65% <0.00%> (ø)
packages/core/src/Util/Reachability.native.ts 37.50% <0.00%> (ø)
packages/xr/src/Providers/SumerianProvider.ts 47.55% <0.00%> (ø)
packages/core/src/OAuthHelper/FacebookOAuth.ts 35.55% <0.00%> (ø)
packages/datastore/src/sync/processors/sync.ts 17.33% <0.00%> (ø)
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b569399...ae4c0ec. Read the comment docs.

@ericclemmons
Copy link
Contributor

@ChristopheBougere Thanks for your PR!

I ran into the same issue in #4979 as part of our UI Refactor (#3279).

You can see an example here:

https://github.com/aws-amplify/amplify-js/blob/ui-components/master/packages/amplify-ui-components/src/components/amplify-sign-in/amplify-sign-in.tsx#L255

The bad news is that there are more strings available in the refactor than master.

I'd love to work with you on getting proper translations into #3279. Your points in #3092 are spot on.

How could I help?

@ericclemmons ericclemmons linked an issue Mar 23, 2020 that may be closed by this pull request
@ChristopheBougere
Copy link
Contributor Author

Hi @ericclemmons
Great to see that the UI refactor includes a translations centralization!
I'd be happy to take care of french translations. I think there is only English for now (with strings located in this file). What would be the process to add a new language?

@ericclemmons
Copy link
Contributor

@ChristopheBougere That's right. In #4979, I tried to carry forward existing translations, but there the implementations weren't 1-to-1.

What we'll need to do is revert a bit of dc26381 so that translations are automatically bootstrapped.

If I setup a PR & lay out how to continue the implementation, would you be able to bring your work over?

@ericclemmons ericclemmons self-assigned this Mar 24, 2020
@ericclemmons ericclemmons requested a review from jordanranz March 24, 2020 18:03
@ChristopheBougere
Copy link
Contributor Author

Sure I could do that. Correct me if I'm wrong, but basically it should consist in a translation of all the strings in this file?

@ericclemmons
Copy link
Contributor

@ChristopheBougere I'll need a bit to setup the PR, but you're right: it's effectively just a map of those translations:

import { Translations } from './common/Translations';

export const fr: Record<Translations, string> = {
   ...
   [Translations.SIGN_OUT]: 'Déconnexion',
   ...
}

@ChristopheBougere
Copy link
Contributor Author

@ericclemmons sounds good to me, let me know when I can help

Copy link
Contributor

@ericclemmons ericclemmons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the improvements! Hopefully we will be able to re-use this in addition to our I18n efforts here: #4979

@ericclemmons ericclemmons changed the title feat(@aws-amplify/aws-amplify-react): improve some french translations fix(@aws-amplify/aws-amplify-react): Improve french translations May 11, 2020
@ericclemmons ericclemmons merged commit f756ee1 into aws-amplify:master May 11, 2020
@thibaultdalban
Copy link

@ericclemmons and @ChristopheBougere I'm not sure if it's the right place to post 😕
I would like to let you know that we just release the first version of an npm package dedicated to the Amplify translations.
Please have a look at https://www.npmjs.com/package/amplify-i18n I would be very interested in your feedback.
Currently, the translations have been done by machine translation but we are going to do an entire review with our professional translators.

@github-actions
Copy link

github-actions bot commented Dec 5, 2021

This pull request has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[I18n] Use slugs instead of English strings as keys
3 participants