-
Notifications
You must be signed in to change notification settings - Fork 90
feat: support localization (#309) #861
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
Open
Sieluna
wants to merge
45
commits into
doodlum:dev
Choose a base branch
from
Sieluna:localization
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 6 commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
d06afec
feat: support skse translation (#309)
Sieluna 3cb34cb
fix: reorder loading order and improve utils
Sieluna 92928ed
refactor: test more translations
Sieluna 9e8d93f
style: 🎨 apply clang-format changes
Sieluna 529e197
refactor: modified general setting
Sieluna d7ab57b
Merge branch 'localization' of https://github.com/Sieluna/skyrim-comm…
Sieluna 27dee83
refactor: improve translation by Pentalimbed's advice
Sieluna aaa5ec2
refactor: small fix and more translations
Sieluna bdee7ad
feat: create font subset feature
Sieluna e939838
style: 🎨 apply clang-format changes
Sieluna 8ac690a
feat: dynamic resolve args and better ci
Sieluna 95f0f2c
style: 🎨 apply clang-format changes
Sieluna 5c0aa19
fix: disable few configs and make more translations
Sieluna c292a71
fix: force build all latin
Sieluna 4915cc8
fix: improve styles and fix string format
Sieluna 5cbdfe9
fix: improve and add missing translations
Sieluna 9a3a116
fix: improve japanese translations
Sieluna 696b6a5
chore: test working-tree-encoding
Sieluna 67b15ad
chore: bake utf8
Sieluna 68827d5
fix: fix typos
Sieluna 835afe2
feat: wip dynamic load font
Sieluna 2abc221
fix: fix few mistakes
Sieluna ab30724
refactor: load font good
Sieluna 861923e
style: 🎨 apply clang-format changes
Sieluna 509a9ce
refactor: move warning closer to input
Sieluna e9136b8
style: 🎨 apply clang-format changes
Sieluna 20f8d4d
ci: prepare translation json
Sieluna 74e51e7
ci: wip loaklise integrate
Sieluna b79d59a
fix: fix a mistake
Sieluna aa21c67
ci: save cache in branch
Sieluna 9dac59b
fix: try allow pr
Sieluna 95c9f32
ci: force lokalise not create pr
Sieluna a51ca43
fix: incorrect iso mapping
Sieluna 7e1151e
fix: bad fix
Sieluna 74a5553
fix: none translates path
Sieluna 3526de2
ci: wip drop the fucking action
Sieluna da69a4d
ci: use esm
Sieluna 4234b04
ci: es module fix
Sieluna 5c09b42
fix: number parse issue
Sieluna 9f7984e
revert: address the issue
Sieluna 2118b5e
fix: to executable
Sieluna 31b82c4
ci: use relative path
Sieluna 7de7b32
Merge remote-tracking branch 'upstream/dev' into localization
Sieluna 60058b8
fix: few small fix
Sieluna bba85aa
chore: check translation failure
alandtse File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,7 @@ build/ | |
| bin/ | ||
| dist/ | ||
| .vs*/ | ||
| .idea/ | ||
| CMakeUserPresets.json | ||
| shadertoolsconfig.json | ||
| .vscode | ||
Binary file not shown.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| #include "Translate.h" | ||
|
|
||
| #include "SKSE/Translation.h" | ||
|
|
||
| namespace Util | ||
| { | ||
| std::string Translate(const std::string& key) | ||
| { | ||
| std::string buffer; | ||
|
|
||
| if (SKSE::Translation::Translate(key, buffer)) { | ||
| return buffer; | ||
| } | ||
|
|
||
| return key; | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| #pragma once | ||
|
|
||
| #include <fmt/core.h> | ||
| #include <string> | ||
|
|
||
| namespace Util | ||
| { | ||
| std::string Translate(const std::string& key); | ||
|
|
||
| template <typename... Args> | ||
| std::string Translate(const std::string& key, Args&&... args) | ||
| { | ||
| const auto translation = Translate(key); | ||
| return fmt::format(fmt::runtime(translation), std::forward<Args>(args)...); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.