瀏覽代碼

Postrelease and fix issue with Uyghur translations not loading

JC Brand 2 年之前
父節點
當前提交
451ed18261
共有 4 個文件被更改,包括 17 次插入7 次删除
  1. 4 0
      CHANGES.md
  2. 6 6
      RELEASE.md
  3. 1 0
      dev.html
  4. 6 1
      src/i18n/index.js

+ 4 - 0
CHANGES.md

@@ -1,5 +1,9 @@
 # Changelog
 
+## 10.1.1 (Unreleased)
+
+- Bugfix. Uyghur translations weren't loading
+
 ## 10.1.0 (2023-01-07)
 
 - #326: Add the ability to reset your password

+ 6 - 6
RELEASE.md

@@ -2,16 +2,16 @@
 
 1. Check that weblate translations are all merged in
 2. Run `make check` to check that all tests pass.
-3. Run `make release VERSION=10.1.0`
+3. Run `make release VERSION=10.1.1`
 4. Do a `git diff` to check if things look sane.
 5. Do a quick manual test with the `dist` files (via `index.html`)
-6. `git commit -am "Release 10.1.0"`
-7. `git tag -s v10.1.0 -m "Release 10.1.0"`
-8. Run `git push && git push origin v10.1.0`
+6. `git commit -am "Release 10.1.1"`
+7. `git tag -s v10.1.1 -m "Release 10.1.1"`
+8. Run `git push && git push origin v10.1.1`
 9. Update https://conversejs.org
     * `cd /home/conversejs/converse.js`
-    * `git clone --branch v10.1.0 git@github.com:conversejs/converse.js.git 10.1.0`
-    * `cd 10.1.0 && nvm install && ASSET_PATH=https://cdn.conversejs.org/10.1.0/dist/ make dist && make doc`
+    * `git clone --branch v10.1.1 git@github.com:conversejs/converse.js.git 10.1.1`
+    * `cd 10.1.1 && nvm install && ASSET_PATH=https://cdn.conversejs.org/10.1.1/dist/ make dist && make doc`
     * `cd .. && git pull && nvm install && ASSET_PATH=https://cdn.conversejs.org/dist/ make dist && make doc`
 10. Update release page on Github
 11. Run `npm publish && cd src/headless/ && npm publish`

+ 1 - 0
dev.html

@@ -28,6 +28,7 @@
     });
 
     converse.initialize({
+        i18n: 'ug',
         theme: 'dracula',
         auto_away: 300,
         enable_smacks: true,

+ 6 - 1
src/i18n/index.js

@@ -66,6 +66,11 @@ function isLocaleAvailable (locale, available) {
     }
 }
 
+function getDayJSLocale (locale) {
+    const dayjs_locale = locale.toLowerCase().replace('_', '-');
+    return dayjs_locale === 'ug' ? 'ug-cn' : dayjs_locale;
+}
+
 
 /* Fetch the translations for the given local at the given URL.
  * @private
@@ -74,7 +79,7 @@ function isLocaleAvailable (locale, available) {
  */
 async function fetchTranslations (_converse) {
     const { api, locale } = _converse;
-    const dayjs_locale = locale.toLowerCase().replace('_', '-');
+    const dayjs_locale = getDayJSLocale(locale);
 
     if (!isConverseLocale(locale, api.settings.get("locales")) || locale === 'en') {
         return;