Wallos: Open-source, self-hostable personal subscription tracker. Visualize your recurring expenses, manage your budget, and save money.
fix: improve date formatting with IntlDateFormatter fallback (b2c565f) (#1048)
Miguel Ribeiro8d43623da9c2
diff --git a/includes/i18n/getlang.php b/includes/i18n/getlang.phpindex a80f93e..c26f8b1 100644--- a/includes/i18n/getlang.php+++ b/includes/i18n/getlang.php@@ -4,6 +4,10 @@ $lang = "en";if (isset($_COOKIE['language'])) {$selectedLanguage = $_COOKIE['language'];+ if (array_key_exists($selectedLanguage, $langname_corrections)) {+ $selectedLanguage = $langname_corrections[$selectedLanguage];+ }+if (array_key_exists($selectedLanguage, $languages)) {$lang = $selectedLanguage;}diff --git a/includes/i18n/jp.php b/includes/i18n/ja.phpsimilarity index 100%rename from includes/i18n/jp.phprename to includes/i18n/ja.phpdiff --git a/includes/i18n/languages.php b/includes/i18n/languages.phpindex 38ea198..1135e29 100644--- a/includes/i18n/languages.php+++ b/includes/i18n/languages.php@@ -13,7 +13,7 @@ $languages = ["fr" => ["name" => "Français", "dir" => "ltr"],"id" => ["name" => "bahasa indonesia", "dir" => "ltr"],"it" => ["name" => "Italiano", "dir" => "ltr"],- "jp" => ["name" => "日本語", "dir" => "ltr"],+ "ja" => ["name" => "日本語", "dir" => "ltr"],"ko" => ["name" => "한국어", "dir" => "ltr"],"nl" => ["name" => "Nederlands", "dir" => "ltr"],"pl" => ["name" => "Polski", "dir" => "ltr"],@@ -29,4 +29,8 @@ $languages = ["vi" => ["name" => "Tiếng Việt", "dir" => "ltr"],"zh_cn" => ["name" => "简体中文", "dir" => "ltr"],"zh_tw" => ["name" => "繁體中文", "dir" => "ltr"],+];++$langname_corrections = [+ "jp" => "ja",];\ No newline at end of filediff --git a/includes/version.php b/includes/version.phpindex aafe20b..20aea75 100644--- a/includes/version.php+++ b/includes/version.php@@ -1,3 +1,3 @@<?php-$version = "v4.8.3";+$version = "v4.8.4";?>diff --git a/migrations/000045.php b/migrations/000045.phpnew file mode 100644index 0000000..dcfa05c--- /dev/null+++ b/migrations/000045.php@@ -0,0 +1,4 @@+<?php+// This migration corrects the Japanese language code from 'jp' to 'ja' in the user table.++$db->exec("UPDATE user SET language = 'ja' WHERE language = 'jp'");\ No newline at end of filediff --git a/scripts/i18n/jp.js b/scripts/i18n/ja.jssimilarity index 100%rename from scripts/i18n/jp.jsrename to scripts/i18n/ja.js