question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Trying to Dynamic update of Translate id

See original GitHub issue

Do you want to request a feature or report a bug? bug

What is the current behavior? Trying to translate my route names in my breadcrumbs

Dynamic update of Translation id on translation component seams to defualt to rout name when using react router. I first thut that it jus did not update on uppdating the id and defualts to the defualt translation. But it updates and breakes translation in a wired way. I have setup and codesandbox with diffrent tests. Reactrouter links and a switch to switch between “pages”.

Links of test

Hase “same key” as route…

/test1
translateId:  links.test1.title
/test1/subtest1
translateId:  links.test1.subtest1.title
/test1/subtest2
translateId:  links.test1.subtest2.title
/test2
translateId:  links.test2.title

Dose not have the same key as route

/3test3/
translateId:  links.test3.title

The last one works fine but the other ones shows the “paths name/abit of the translation id” as a translations in both my bread crums and my meny link.

The meniy link is fine onmount untill i show it in the breadcrum translation then it changes to small case instead of upper case.

Alsow tried to remov the defualt value inside of <Translation id={...}>${defualt}</Translation> and that works fine. But i need the defualt value to handel dynamic routes.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below: https://codesandbox.io/s/qv7vonxrlq What is the expected behavior? The defualt translation value should not globaly break translations?

Which versions of react and react-localize-redux are you using? “react”: “^16.6.3”, “react-localize-redux”: “^3.5.1”,

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ryandrewjohnsoncommented, Dec 4, 2018

I believe at the time of development I was contemplating whether to make the inline translation override configurable. At the time I felt that the API footprint was getting a bit verbose, and ended up opting to not make it configurable.

I agree that this could be confusing, and is something that should be added to the roadmap for next major version. As we’ll be able to reevaluate how configurable options are passed in.

0reactions
ryandrewjohnsoncommented, Dec 5, 2018

Now tracking in #140

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to translate dynamic content? - Help Center
5) Go to your Weglot Dashboard > Settings > App Settings and Add the dynamic content (related) .class or #id you want to...
Read more >
Dynamic Translation - Product Documentation | ServiceNow
You can dynamically translate text entered in an application, such as a user-entered text on forms, for a seamless localization experience.
Read more >
Dynamic Translation - Salesforce Developer Community
I just want to know , is there any way to convert dynamic data into desired language (How the SalesForce is doing it?)...
Read more >
Beyond YML Files - dynamic translations - Collective Idea
The standard I18n implementation has you store your translation in . ... rails g controller Translations index new create edit update.
Read more >
How to translate a dynamic web application - Developer Docs
You'll also want to continue “tuning” your list of phrases on a regular basis, as new phrases are found by Localize. What you'll...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found