Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

iYonga
Copy link

@iYonga iYonga commented Nov 15, 2023

Cleaned up the language code

Combined Locales

Created a locales object to link each language code with its data.

Unified Locale Function

Made a getLocale function. It combines the base language data with any extra bits you add. This means you don't have to write the same code for each language.

Streamlined Language Functions

en, es, ja, tr etc now just use getLocale. It's cleaner and makes adding more languages easy. (Hopefully.) I would make them JSON files instead of separate ts files though. But I didn't want to overstep any boundaries.

Overall, I tried getting rid of repetitive if-else stuff.

Added Turkish Language

Created by @selcukemiravci and @Visual917

@iYonga iYonga requested a review from a team November 15, 2023 22:58
Copy link

changeset-bot bot commented Nov 15, 2023

🦋 Changeset detected

Latest commit: dfe4690

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@thirdweb-dev/react-native Patch
@thirdweb-dev/react Patch
@thirdweb-dev/react-core Patch
@thirdweb-dev/react-native-compat Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@joaquim-verges
Copy link
Member

thank you @Visual917 ! super helpful - we'll review this and get it in asap :)

Copy link
Contributor

@iketw iketw 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 working on this! A minor comment ;)

@iketw
Copy link
Contributor

iketw commented Nov 16, 2023

@Visual917 made the changes here: #1962. Let me know if it looks good to you and I'll merge it :). Thanks for working on this!

@jnsdls
Copy link
Member

jnsdls commented Jan 11, 2024

superseded by #1962

@jnsdls jnsdls closed this Jan 11, 2024
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.

4 participants