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

Use English as fallback for missing strings when generating translation ... #2635

Closed

Conversation

nichtsistwahr
Copy link

Generate client translation js with English fallback as suggested in https://meta.discourse.org/t/missing-translation-defaults-to-english/15771/9

@discoursebot
Copy link

You've signed the CLA, nichtsistwahr. Thank you! This pull request is ready for review.

@SamSaffron
Copy link
Member

My worry here is that we are putting something into "dev" environment for production.

I would much prefer if

  1. In development ... no fallback
  2. in production ... fallback with an additional querystring ?localization_fallback=false for cases when localizers need to test without fallback.

@nichtsistwahr
Copy link
Author

I can see that. Since I am not that experienced with rails development, I could use some pointers. I guess I would have to:

  • generate two separate js locale files for each locale - one with and one without the merged EN locale
  • register the additional assets
  • add a route that registers the query string and decides which locale js to serve

Am I missing something?

@coding-horror
Copy link
Contributor

Sam isn't this obviated by your changes documented here:

https://meta.discourse.org/t/enjoy-matching-translated-strings-and-their-translation-keys-right-in-the-
gui/19219

and

To enable you have the "verbose_localization" site setting.

Use:

I18n.verbose_localization_session()

?

@SamSaffron
Copy link
Member

@coding-horror this is related but not the same issue, the attempt here is to make the UI usable in production in cases where only partial translation is available (fallback to English)

@SamSaffron
Copy link
Member

@eviltrout we need to think about a solution here, we want to enable fallback localization in EN but only in prd.

@eviltrout
Copy link
Contributor

Can't we just do it when baking the assets though? In production mode, mix in the english keys?

@SamSaffron
Copy link
Member

yeah that was what I was thinking.

On Tue, Nov 25, 2014 at 2:18 AM, Robin Ward notifications@github.com
wrote:

Can't we just do it when baking the assets though? In production mode, mix
in the english keys?


Reply to this email directly or view it on GitHub
#2635 (comment).

@coding-horror
Copy link
Contributor

Closing this for now as it is getting pretty old. Let's revisit later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants