mirror of
https://github.com/Karaka-Management/oms-Admin.git
synced 2026-02-13 19:18:41 +00:00
implement localization installation
This commit is contained in:
parent
425751e915
commit
c3369ea432
|
|
@ -22,7 +22,8 @@
|
||||||
"country_code2": {
|
"country_code2": {
|
||||||
"name": "country_code2",
|
"name": "country_code2",
|
||||||
"type": "VARCHAR(2)",
|
"type": "VARCHAR(2)",
|
||||||
"null": false
|
"null": false,
|
||||||
|
"unique": true
|
||||||
},
|
},
|
||||||
"country_code3": {
|
"country_code3": {
|
||||||
"name": "country_code3",
|
"name": "country_code3",
|
||||||
|
|
@ -97,7 +98,8 @@
|
||||||
"language_639_2T": {
|
"language_639_2T": {
|
||||||
"name": "language_639_2T",
|
"name": "language_639_2T",
|
||||||
"type": "VARCHAR(2)",
|
"type": "VARCHAR(2)",
|
||||||
"null": false
|
"null": false,
|
||||||
|
"unique": true
|
||||||
},
|
},
|
||||||
"language_639_2B": {
|
"language_639_2B": {
|
||||||
"name": "language_639_2B",
|
"name": "language_639_2B",
|
||||||
|
|
@ -134,21 +136,27 @@
|
||||||
"currency_symbol": {
|
"currency_symbol": {
|
||||||
"name": "currency_symbol",
|
"name": "currency_symbol",
|
||||||
"type": "VARCHAR(5)",
|
"type": "VARCHAR(5)",
|
||||||
"null": false
|
"null": true
|
||||||
},
|
},
|
||||||
"currency_code": {
|
"currency_code": {
|
||||||
"name": "currency_code",
|
"name": "currency_code",
|
||||||
"type": "VARCHAR(3)",
|
"type": "VARCHAR(3)",
|
||||||
"null": false
|
"null": false,
|
||||||
|
"unique": true
|
||||||
},
|
},
|
||||||
"currency_decimals": {
|
"currency_decimal": {
|
||||||
"name": "currency_decimals",
|
"name": "currency_decimal",
|
||||||
"type": "VARCHAR(10)",
|
"type": "VARCHAR(10)",
|
||||||
"null": false
|
"null": false
|
||||||
},
|
},
|
||||||
"currency_subunits": {
|
"currency_subunits": {
|
||||||
"name": "currency_subunits",
|
"name": "currency_subunits",
|
||||||
"type": "TINYINT(3)",
|
"type": "INT(11)",
|
||||||
|
"null": true
|
||||||
|
},
|
||||||
|
"currency_countries": {
|
||||||
|
"name": "currency_countries",
|
||||||
|
"type": "TEXT",
|
||||||
"null": false
|
"null": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -165,19 +173,19 @@
|
||||||
},
|
},
|
||||||
"l11n_country": {
|
"l11n_country": {
|
||||||
"name": "l11n_country",
|
"name": "l11n_country",
|
||||||
"type": "INT(11)",
|
"type": "VARCHAR(2)",
|
||||||
"default": null,
|
"default": null,
|
||||||
"null": true,
|
"null": true,
|
||||||
"foreignTable": "country",
|
"foreignTable": "country",
|
||||||
"foreignKey": "country_id"
|
"foreignKey": "country_code2"
|
||||||
},
|
},
|
||||||
"l11n_language": {
|
"l11n_language": {
|
||||||
"name": "l11n_language",
|
"name": "l11n_language",
|
||||||
"type": "INT(11)",
|
"type": "VARCHAR(2)",
|
||||||
"default": null,
|
"default": null,
|
||||||
"null": true,
|
"null": true,
|
||||||
"foreignTable": "language",
|
"foreignTable": "language",
|
||||||
"foreignKey": "language_id"
|
"foreignKey": "language_639_2T"
|
||||||
},
|
},
|
||||||
"l11n_datetime": {
|
"l11n_datetime": {
|
||||||
"name": "l11n_datetime",
|
"name": "l11n_datetime",
|
||||||
|
|
@ -187,11 +195,11 @@
|
||||||
},
|
},
|
||||||
"l11n_currency": {
|
"l11n_currency": {
|
||||||
"name": "l11n_currency",
|
"name": "l11n_currency",
|
||||||
"type": "INT(11)",
|
"type": "VARCHAR(3)",
|
||||||
"default": null,
|
"default": null,
|
||||||
"null": true,
|
"null": true,
|
||||||
"foreignTable": "currency",
|
"foreignTable": "currency",
|
||||||
"foreignKey": "currency_id"
|
"foreignKey": "currency_code"
|
||||||
},
|
},
|
||||||
"l11n_number_thousand": {
|
"l11n_number_thousand": {
|
||||||
"name": "l11n_number_thousand",
|
"name": "l11n_number_thousand",
|
||||||
|
|
|
||||||
|
|
@ -75,10 +75,10 @@ final class Installer extends InstallerAbstract
|
||||||
|
|
||||||
foreach ($countries as $country) {
|
foreach ($countries as $country) {
|
||||||
$query->values(
|
$query->values(
|
||||||
$country['country_name'],
|
$country['country_name'] === null ? null : \trim($country['country_name']),
|
||||||
$country['country_name'],
|
$country['country_name'] === null ? null : \trim($country['country_name']),
|
||||||
$country['country_code2'],
|
$country['country_code2'] === null ? null : \trim($country['country_code2']),
|
||||||
$country['country_code3'],
|
$country['country_code3'] === null ? null : \trim($country['country_code3']),
|
||||||
$country['country_numeric']
|
$country['country_numeric']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -110,11 +110,11 @@ final class Installer extends InstallerAbstract
|
||||||
|
|
||||||
foreach ($languages as $language) {
|
foreach ($languages as $language) {
|
||||||
$query->values(
|
$query->values(
|
||||||
$language['language_name'],
|
$language['language_name'] === null ? null : \trim($language['language_name']),
|
||||||
$language['language_native'],
|
$language['language_native'] === null ? null : \trim($language['language_native']),
|
||||||
$language['language_639_2T'],
|
$language['language_639_2T'] === null ? null : \trim($language['language_639_2T']),
|
||||||
$language['language_639_2B'],
|
$language['language_639_2B'] === null ? null : \trim($language['language_639_2B']),
|
||||||
$language['language_639_3']
|
$language['language_639_3'] === null ? null : \trim($language['language_639_3'])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -146,13 +146,13 @@ final class Installer extends InstallerAbstract
|
||||||
foreach ($currencies as $currency) {
|
foreach ($currencies as $currency) {
|
||||||
$query->values(
|
$query->values(
|
||||||
$currency['currency_id'],
|
$currency['currency_id'],
|
||||||
$currency['currency_name'],
|
$currency['currency_name'] === null ? null : \trim($currency['currency_name']),
|
||||||
$currency['currency_code'],
|
$currency['currency_code'] === null ? null : \trim($currency['currency_code']),
|
||||||
$currency['currency_number'],
|
$currency['currency_number'] === null ? null : \trim($currency['currency_number']),
|
||||||
$currency['currency_symbol'],
|
$currency['currency_symbol'] === null ? null : \trim($currency['currency_symbol']),
|
||||||
$currency['currency_subunits'],
|
$currency['currency_subunits'],
|
||||||
$currency['currency_decimal'],
|
$currency['currency_decimal'] === null ? null : \trim($currency['currency_decimal']),
|
||||||
$currency['currency_countries']
|
$currency['currency_countries'] === null ? null : \trim($currency['currency_countries'])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,9 @@ final class LocalizationMapper extends DataMapperAbstract
|
||||||
*/
|
*/
|
||||||
protected static array $columns = [
|
protected static array $columns = [
|
||||||
'l11n_id' => ['name' => 'l11n_id', 'type' => 'int', 'internal' => 'id'],
|
'l11n_id' => ['name' => 'l11n_id', 'type' => 'int', 'internal' => 'id'],
|
||||||
|
'l11n_country' => ['name' => 'l11n_country', 'type' => 'string', 'internal' => 'country'],
|
||||||
|
'l11n_language' => ['name' => 'l11n_language', 'type' => 'string', 'internal' => 'language'],
|
||||||
|
'l11n_currency' => ['name' => 'l11n_currency', 'type' => 'string', 'internal' => 'currency'],
|
||||||
'l11n_number_thousand' => ['name' => 'l11n_number_thousand', 'type' => 'string', 'internal' => 'thousands'],
|
'l11n_number_thousand' => ['name' => 'l11n_number_thousand', 'type' => 'string', 'internal' => 'thousands'],
|
||||||
'l11n_number_decimal' => ['name' => 'l11n_number_decimal', 'type' => 'string', 'internal' => 'decimal'],
|
'l11n_number_decimal' => ['name' => 'l11n_number_decimal', 'type' => 'string', 'internal' => 'decimal'],
|
||||||
'l11n_angle' => ['name' => 'l11n_angle', 'type' => 'string', 'internal' => 'angle'],
|
'l11n_angle' => ['name' => 'l11n_angle', 'type' => 'string', 'internal' => 'angle'],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user