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

Replace i18n by a custom implementation #638

Merged
merged 1 commit into from Jan 31, 2020
Merged

Conversation

vjeux
Copy link
Contributor

@vjeux vjeux commented Jan 31, 2020

There are two problems with the current localization strategy:

  • We download the translations on-demand, which means that it does a serial roundtrip for nothing.
  • withTranslation helper actually renders the app 3 times on startup, instead of once (I haven't tried to debug it)

This removes all the i18n requires except for the one that does language detection.

Test Plan:

  • Make sure that browser language detection works (it sets it to French for me)
  • Change the language and make sure it changes all the strings in the UI
  • Get a link and make sure that {{url}} is properly replaced
  • Refresh the page, make sure that the last set language is still set

@vercel
Copy link

vercel bot commented Jan 31, 2020

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/vjeux/excalidraw/gw5b5yo2w
✅ Preview: https://excalidraw-git-fork-vjeux-removei18n.vjeux.now.sh

There are two problems with the current localization strategy:
- We download the translations on-demand, which means that it does a serial roundtrip for nothing.
- withTranslation helper actually renders the app 3 times on startup, instead of once (I haven't tried to debug it)
@lipis
Copy link
Member

lipis commented Jan 31, 2020

Works nicely! One thing though.. do we have to change that as well maybe?

Screenshot 2020-01-31 at 11 03 38 PM

@vjeux vjeux merged commit e4919e2 into excalidraw:master Jan 31, 2020
@vjeux
Copy link
Contributor Author

vjeux commented Jan 31, 2020

I'm going to leave the html tag as is for now. I have no idea how it's being used at runtime.

amilajack pushed a commit to palettedev/excalidraw that referenced this pull request Mar 6, 2023
* Add pencil icon to rename page input

* improve style for page name input

Co-authored-by: judicael_ai <judicael@smartpredict.ai>
Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants