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

chore: add more translations #908

Merged
merged 41 commits into from
Jan 26, 2024
Merged

Conversation

he0119
Copy link
Contributor

@he0119 he0119 commented Jan 24, 2024

tried my best to find translatable strings.

there maybe some duplicate strings, don't know if they should be merged together.

assisted by i18n-ally.

{
  "i18n-ally.languageTagSystem": "legacy",
  "i18n-ally.localesPaths": "strings/languages/",
  "i18n-ally.pathMatcher": "{locale}/strings.json",
  "i18n-ally.keystyle": "nested",
  "i18n-ally.preferredDelimiter": ".",
  "i18n-ally.enabledFrameworks": ["react-i18next"],
  "i18n-ally.sourceLanguage": "en",
  "i18n-ally.displayLanguage": "zh-CN",
  "i18n-ally.extract.autoDetect": true,
  "i18n-ally.regex.usageMatch": [
    "[^\\w\\d]getString\\((?:\\s+)?['\"`]({key})['\"`]"
  ],
  "i18n-ally.refactor.templates": [
    {
      "templates": ["getString('{key}'{args})", "{getString('{key}{args}')}"]
    }
  ],
  "i18n-ally.editor.preferEditor": true,
  "i18n-ally.sortKeys": true
}

nyagami

This comment was marked as spam.

src/hooks/persisted/useNovel.ts Outdated Show resolved Hide resolved
src/screens/browse/BrowseSettings.tsx Outdated Show resolved Hide resolved
src/database/queries/ChapterQueries.ts Outdated Show resolved Hide resolved
src/screens/novel/components/EditInfoModal.tsx Outdated Show resolved Hide resolved
src/screens/novel/components/NovelBottomSheet.tsx Outdated Show resolved Hide resolved
src/screens/novel/components/NovelBottomSheet.tsx Outdated Show resolved Hide resolved
src/screens/settings/SettingsBackupScreen/index.tsx Outdated Show resolved Hide resolved
src/screens/updates/UpdatesScreen.tsx Outdated Show resolved Hide resolved
@nyagami
Copy link
Member

nyagami commented Jan 24, 2024

I know it's too late to change. But do you think getting strings to translate by screens is a gud solution ? @rajarsheechatterjee .
screenName.subScreenName.someAction.
What if the module is changed. the tranlated strings will be dropped right?

@rajarsheechatterjee
Copy link
Member

I know it's too late to change. But do you think getting strings to translate by screens is a gud solution ? @rajarsheechatterjee . screenName.subScreenName.someAction. What if the module is changed. the tranlated strings will be dropped right?

I initially used this so the context of the string is there while translating. It might not be necessary and also it's making the keys really long. Going forward we can add newer strings directly instead of nesting it.

@he0119
Copy link
Contributor Author

he0119 commented Jan 25, 2024

I initially used this so the context of the string is there while translating. It might not be necessary and also it's making the keys really long. Going forward we can add newer strings directly instead of nesting it.

Maybe I should rename the keys right away in this PR.

@he0119 he0119 force-pushed the feat/more-translation branch from 5ec7560 to f640cd3 Compare January 25, 2024 18:30
@he0119 he0119 marked this pull request as draft January 26, 2024 01:46
@he0119 he0119 force-pushed the feat/more-translation branch from e34963b to 67fa44b Compare January 26, 2024 02:53
@he0119 he0119 marked this pull request as ready for review January 26, 2024 02:54
Copy link
Member

@nyagami nyagami left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

@nyagami nyagami merged commit 0e633b4 into LNReader:master Jan 26, 2024
1 check passed
@he0119 he0119 deleted the feat/more-translation branch January 26, 2024 12:02
@he0119 he0119 mentioned this pull request Jan 27, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 29, 2024
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.

3 participants