feat(vscode): localize loading splash and dev-server status for Turkish (#3303)
Thanks for filling in the Turkish bootstrap messages. Glossary and evidence-text follow-ups are maintainer-owned.
This commit is contained in:
@@ -202,31 +202,48 @@ export function getWebviewHtml(options: WebviewHtmlOptions): string {
|
|||||||
var rawLocale = window.localStorage.getItem('openchamber.i18n.v1');
|
var rawLocale = window.localStorage.getItem('openchamber.i18n.v1');
|
||||||
if (rawLocale) {
|
if (rawLocale) {
|
||||||
var parsedLocale = JSON.parse(rawLocale);
|
var parsedLocale = JSON.parse(rawLocale);
|
||||||
if (parsedLocale && typeof parsedLocale.locale === 'string' && parsedLocale.locale.toLowerCase().indexOf('fr') === 0) {
|
if (parsedLocale && typeof parsedLocale.locale === 'string') {
|
||||||
locale = 'fr';
|
var detected = parsedLocale.locale.toLowerCase();
|
||||||
|
if (detected.indexOf('fr') === 0) {
|
||||||
|
locale = 'fr';
|
||||||
|
} else if (detected.indexOf('tr') === 0) {
|
||||||
|
locale = 'tr';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch {}
|
} catch {}
|
||||||
|
|
||||||
return locale === 'fr'
|
if (locale === 'fr') {
|
||||||
? {
|
return {
|
||||||
startingApi: 'Démarrage de l’API OpenCode…',
|
startingApi: 'Démarrage de l’API OpenCode…',
|
||||||
initializing: 'Initialisation…',
|
initializing: 'Initialisation…',
|
||||||
connecting: 'Connexion…',
|
connecting: 'Connexion…',
|
||||||
connected: 'Connecté !',
|
connected: 'Connecté !',
|
||||||
connectionError: 'Erreur de connexion',
|
connectionError: 'Erreur de connexion',
|
||||||
reconnecting: 'Reconnexion…',
|
reconnecting: 'Reconnexion…',
|
||||||
cliNotFound: 'L’interface en ligne de commande OpenCode est introuvable. Veuillez l’installer d’abord.',
|
cliNotFound: 'L’interface en ligne de commande OpenCode est introuvable. Veuillez l’installer d’abord.',
|
||||||
}
|
};
|
||||||
: {
|
}
|
||||||
startingApi: 'Starting OpenCode API…',
|
if (locale === 'tr') {
|
||||||
initializing: 'Initializing…',
|
return {
|
||||||
connecting: 'Connecting…',
|
startingApi: 'OpenCode API başlatılıyor…',
|
||||||
connected: 'Connected!',
|
initializing: 'Başlatılıyor…',
|
||||||
connectionError: 'Connection error',
|
connecting: 'Bağlanılıyor…',
|
||||||
reconnecting: 'Reconnecting…',
|
connected: 'Bağlandı!',
|
||||||
cliNotFound: 'OpenCode CLI not found. Please install it first.',
|
connectionError: 'Bağlantı hatası',
|
||||||
};
|
reconnecting: 'Yeniden bağlanılıyor…',
|
||||||
|
cliNotFound: 'OpenCode CLI bulunamadı. Lütfen önce yükleyin.',
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
startingApi: 'Starting OpenCode API…',
|
||||||
|
initializing: 'Initializing…',
|
||||||
|
connecting: 'Connecting…',
|
||||||
|
connected: 'Connected!',
|
||||||
|
connectionError: 'Connection error',
|
||||||
|
reconnecting: 'Reconnecting…',
|
||||||
|
cliNotFound: 'OpenCode CLI not found. Please install it first.',
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
(function applyBootstrapLocale() {
|
(function applyBootstrapLocale() {
|
||||||
@@ -283,11 +300,20 @@ export function getWebviewHtml(options: WebviewHtmlOptions): string {
|
|||||||
const rawLocale = window.localStorage.getItem('openchamber.i18n.v1');
|
const rawLocale = window.localStorage.getItem('openchamber.i18n.v1');
|
||||||
if (rawLocale) {
|
if (rawLocale) {
|
||||||
const parsedLocale = JSON.parse(rawLocale);
|
const parsedLocale = JSON.parse(rawLocale);
|
||||||
if (parsedLocale && typeof parsedLocale.locale === 'string' && parsedLocale.locale.toLowerCase().indexOf('fr') === 0) {
|
if (parsedLocale && typeof parsedLocale.locale === 'string') {
|
||||||
return {
|
const detected = parsedLocale.locale.toLowerCase();
|
||||||
startingDevServer: (host) => 'Démarrage du serveur de développement de la webview (' + host + ')...',
|
if (detected.indexOf('fr') === 0) {
|
||||||
waitingDevServer: (host, attempt) => 'En attente du serveur de développement de la webview (' + host + ')... tentative ' + attempt,
|
return {
|
||||||
};
|
startingDevServer: (host) => 'Démarrage du serveur de développement de la webview (' + host + ')...',
|
||||||
|
waitingDevServer: (host, attempt) => 'En attente du serveur de développement de la webview (' + host + ')... tentative ' + attempt,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if (detected.indexOf('tr') === 0) {
|
||||||
|
return {
|
||||||
|
startingDevServer: (host) => 'Webview geliştirme sunucusu başlatılıyor (' + host + ')...',
|
||||||
|
waitingDevServer: (host, attempt) => 'Webview geliştirme sunucusu bekleniyor (' + host + ')... deneme ' + attempt,
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch {}
|
} catch {}
|
||||||
|
|||||||
Reference in New Issue
Block a user