Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

chore: add useT hook to i18n #223

Merged
merged 2 commits into from
May 12, 2022
Merged

chore: add useT hook to i18n #223

merged 2 commits into from
May 12, 2022

Conversation

rot1024
Copy link
Member

@rot1024 rot1024 commented May 11, 2022

  • I added useT hook to @reearth/i18n that enables writing translations with less typing.
    • NOTE: Do not use other variable names than t, as translation will not be visible to the i18n-parser
  • Disable i18n-parser option useKeysAsDefaultValue to clarify whether each text is translated or not. There is no effect on the on-screen display (if empty, the key is used as is).

@rot1024 rot1024 requested a review from KaWaite as a code owner May 11, 2022 04:06
@netlify
Copy link

netlify bot commented May 11, 2022

Deploy Preview for reearth-web ready!

Name Link
🔨 Latest commit 5a2fc99
🔍 Latest deploy log https://app.netlify.com/sites/reearth-web/deploys/627c78a1c8a8e700087bbada
😎 Deploy Preview https://deploy-preview-223--reearth-web.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@codecov
Copy link

codecov bot commented May 11, 2022

Codecov Report

Merging #223 (5a2fc99) into main (3e3e459) will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #223      +/-   ##
==========================================
+ Coverage   43.99%   44.03%   +0.04%     
==========================================
  Files          63       64       +1     
  Lines        1357     1358       +1     
  Branches      228      228              
==========================================
+ Hits          597      598       +1     
  Misses        697      697              
  Partials       63       63              
Impacted Files Coverage Δ
src/i18n/index.tsx 100.00% <100.00%> (ø)

@rot1024 rot1024 changed the title chore: add useT to chore: add useT hook to i18n May 11, 2022
Copy link
Member

@KaWaite KaWaite left a comment

Choose a reason for hiding this comment

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

Approved with a question about implementation. When you have time if you could answer that would be awesome!

@rot1024 rot1024 merged commit b961773 into main May 12, 2022
@rot1024 rot1024 deleted the uset branch May 12, 2022 03:07
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.

2 participants