i18n
- Moved nearly all strings into package.nls.json
- Translations
- [x] German translation
- [ ] Swedish translation @Vild pls
- [x] Japanese translation @alphaKAI maybe?
Swedish is basically just to attract some Swedish users to D and Japanese because a lot of D users are Japanese. Just had German done now because I needed a language to test the feature, but it's also useful because there are a lot of Germans in the D community too.
Adding a translation: Duplicate package.nls.json and name it package.nls.<language>.json, where <language> is a 2 letter language code(?) like de or ja. If you aren't sure what the code is start vscode with the locale of your choice, add console.log(vscode.env.language); to src/extension.ts in the line just after export function activate(...) { and start the extension. The code will get logged right at the top as first message. Then just go in your file and translate all string values.
I saw that @SeijiFujita has some translations of the settings in his repo: https://github.com/SeijiFujita/quiita_works/blob/master/using_vscode_04/using_vscode_04.md#d-configuration-settingjson
@SeijiFujita Are those direct translations that I could include in the japanese translation of code-d in this PR? I can copy them in here if you allow me to, or you could PR into this branch (i18n) if you want to.
You can use translations I uploaded to github. I actively want to participate in PR of code-d i18n. However, I do not understand vscode language nls function, do you have a file to convert to Japanese somewhere?
I decided to create package.nls.ja.json, I saw this page and understood.
I have created "package.nls.ja.json" and changed "package.json". After translating the title of the command, the incremental search did not work. I added a category to package.json.
https://github.com/SeijiFujita/code-d-ja
Hm the category seems like a nice workaround for https://github.com/Microsoft/vscode/issues/17549 but I would prefer if they fixed that instead of using category.
Usually they take very long to implement those minor side issues and also never really give any feedback on the issue by closing it. But I think because this also affects their extensions, this should get implemented a bit quicker.
Also when done with translating make sure the commands work (just try typing one command) and make sure the status messages work (just set dub.configuration in your workspace settings to something non existent)
Also if you want to have it a bit easier to merge your changes into this repository later, fork code-d (this repository) and run git checkout i18n in the console. You will then be able to PR using github and it's easier to track changes. If you want to be listed in the contributors page on the github project you must do this because otherwise I can only use your additions by copy pasting the files.
understand that "category" thing.
I'd like to create a branch for this "i18n", but I could not. Next I did a fork on code-d and did the following work.
- git clone my-fork-code-d.
- git checkout -b i18n-ja
- add i18n files
- git commit
- add "package.nls.ja.json"
- git commit
Can I PR for this "i18n-ja"? https://github.com/SeijiFujita/code-d/branches
that should work, I need to merge master into here anyway so that should be fine
But actually the way you did it won't work. Try these steps instead:
- git clone my-fork-code-d
- git checkout i18n
- add "package.nls.ja.json"
- git commit
TODO: redo for serve-d rewrite which is now in master