mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-11-04 23:43:20 +08:00
Convert localization from AMD to ES modules
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/** en/main localization hash - for use with requirejs' i18n plugin */
|
||||
define({
|
||||
export default {
|
||||
// ----------------------------------------------------------------------------- masthead
|
||||
"Analyze Data": "Daten analysieren",
|
||||
Workflow: "Arbeitsablauf",
|
||||
@@ -201,4 +201,4 @@ define({
|
||||
// ---------------------------------------------------------------------------- misc. MVC
|
||||
Tags: "Variablen",
|
||||
"Edit annotation": "Anmerkung bearbeiten",
|
||||
});
|
||||
};
|
||||
@@ -1,6 +1,6 @@
|
||||
/** en/main localization hash - for use with requirejs' i18n plugin */
|
||||
|
||||
define({
|
||||
export default {
|
||||
// ----------------------------------------------------------------------------- masthead
|
||||
|
||||
"Analyze Data": "Analizar Datos",
|
||||
@@ -817,4 +817,4 @@ define({
|
||||
// ---------------------------------------------------------------------------- workflow_editor_tests
|
||||
"tool tooltip": "Mensaje de información sobre herramientas",
|
||||
// ----------------------------------------------------------------------------
|
||||
});
|
||||
};
|
||||
@@ -1,5 +1,5 @@
|
||||
/** fr localization */
|
||||
define({
|
||||
export default {
|
||||
// ----------------------------------------------------------------------------- masthead
|
||||
"Analyze Data": "Analyse de données",
|
||||
Workflow: "Workflow",
|
||||
@@ -453,4 +453,4 @@ define({
|
||||
// ---------------------------------------------------------------------------- workflow_editor_tests
|
||||
"tool tooltip": false,
|
||||
// ----------------------------------------------------------------------------
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* ES module locale aggregator
|
||||
* This replaces the RequireJS i18n plugin functionality
|
||||
* Loads all languages and returns them in the expected format
|
||||
*/
|
||||
|
||||
// Import root strings and supported languages
|
||||
import { root, supportedLanguages } from './locale.js';
|
||||
|
||||
// Import all language files
|
||||
import frLocale from './fr/locale.js';
|
||||
import esLocale from './es/locale.js';
|
||||
import jaLocale from './ja/locale.js';
|
||||
import zhLocale from './zh/locale.js';
|
||||
import deLocale from './de/locale.js';
|
||||
|
||||
// Build the locale strings object with the same structure
|
||||
// that the i18n loader would have created
|
||||
const localeStrings = {
|
||||
__root: root,
|
||||
__fr: frLocale,
|
||||
__es: esLocale,
|
||||
__ja: jaLocale,
|
||||
__zh: zhLocale,
|
||||
__de: deLocale,
|
||||
// Add language codes without underscores for compatibility
|
||||
fr: frLocale,
|
||||
es: esLocale,
|
||||
ja: jaLocale,
|
||||
zh: zhLocale,
|
||||
de: deLocale
|
||||
};
|
||||
|
||||
// Export with the same structure that the i18n loader would have created
|
||||
export default localeStrings;
|
||||
@@ -1,5 +1,5 @@
|
||||
/** ja localization */
|
||||
define({
|
||||
export default {
|
||||
// ----------------------------------------------------------------------------- masthead
|
||||
"Analyze Data": "データ解析",
|
||||
Workflow: "ワークフロー",
|
||||
@@ -279,4 +279,4 @@ define({
|
||||
"Edit annotation": "アノテーションを編集",
|
||||
//false,
|
||||
"Your workflows": "あなたのワークフロー",
|
||||
});
|
||||
};
|
||||
@@ -1,6 +1,5 @@
|
||||
/** en/main localization hash - for use with requirejs' i18n plugin */
|
||||
define({
|
||||
root: {
|
||||
/** en/main localization hash - converted to ES module */
|
||||
export const root = {
|
||||
// ----------------------------------------------------------------------------- masthead
|
||||
"Analyze Data": false,
|
||||
Workflow: false,
|
||||
@@ -459,9 +458,11 @@ define({
|
||||
"Forgot password?": false,
|
||||
"Register here.": false,
|
||||
"Click here to reset your password.": false,
|
||||
},
|
||||
};
|
||||
|
||||
export const supportedLanguages = {
|
||||
ja: true,
|
||||
fr: true,
|
||||
zh: true,
|
||||
es: true,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** zh localization */
|
||||
/* any suggestions, please contact me: ishenweiyan@foxmail.com */
|
||||
define({
|
||||
export default {
|
||||
// ----------------------------------------------------------------------------- masthead
|
||||
"Analyze Data": "数据分析",
|
||||
Workflow: "工作流程",
|
||||
@@ -471,4 +471,4 @@ define({
|
||||
ja: true,
|
||||
fr: true,
|
||||
zh: true,
|
||||
});
|
||||
};
|
||||
@@ -1,4 +1,4 @@
|
||||
import localeStrings from "i18n!nls/locale";
|
||||
import localeStrings from "@/nls/index.js";
|
||||
|
||||
/**
|
||||
* @param {String} strToLocalize
|
||||
|
||||
Reference in New Issue
Block a user