-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
Enhancement: Multilingual UI #598
Comments
Thanks for the suggestion @gsegit. Haven't planned anything for this yet, but if you want or any other of the contributors, I'm welcome to accept PRs for this one. |
I did the initial configuration to allow us to localize the Front Matter UI. I used the vscode-l10n localization approach to support it, but with a couple of changes, as it only localizes the configuration or anything related to the extension host, not the web views. To overcome this, I pass the localization bundle to the web view, and once loaded, it can be used in the React codebase as follows: l10n.t(`header.startup.label`) The localization files are located in the You can find two files:
By default, the |
I have been optimizing the flow. There are two new scripts created:
When creating a key, start with the type of web view to where you want to add it. This can be {
"dashboard.header.createContent": "Create content",
"dashboard.header.startup.label": "Open on startup?",
"panel.actions.title": "Actions",
"panel.actions.openDashboard": "Open dashboard",
"panel.actions.openPreview": "Open preview",
"panel.actions.startServer": "Start server",
"panel.actions.stopServer": "Stop server",
"panel.actions.createContent": "Create content"
}
If you want to start using the localization labels in the web views, you must include the import * as l10n from "@vscode/l10n"
import { LocalizationKey } from '../../localization';
// Usage
l10n.t(LocalizationKey.panelActionsCreateContent) |
All the hardcoded strings have been moved over to the |
Commands and settings have also been localized. To support another language, create a new Todo
|
@mayumih387, you can test out the latest v9 beta which includes your Japanese translations. |
@gsegit I have added German translations (via OpenAI). Would you be able to give the latest beta a try and check if they are any good? |
Hi there 🌞 sorry for the later answer, but i have total forget my post here 😅 Thanks you for your, i would test the translation in the next days 😎🌞 |
Hi there ;D Greetings |
Hi there I hope you understand my englisch 🤣 |
A lot of the German translations were manually provided by one of our contributors. If you see some mismatches or where translations can be enhanced, feel free to push changes via a PR, and we will be happy to merge them into the project. The German translation file can be found here: https://github.com/estruyf/vscode-front-matter/blob/main/l10n/bundle.l10n.de.json |
Hi there ;D
Can your Ext be translated into another language, such as my native German ? Is something like that foreseen ?
Greetings from Germany ;D
Bogus
The text was updated successfully, but these errors were encountered: