feat: Add full i18n support to Smart Mind Map plugin
- Consolidated smart_mind_map.py and smart_mind_map_cn.py into a single file. - Added TRANSLATIONS dictionary supporting 17 languages (en-US, ko-KR, fr-FR, es-AR, en-CA, fr-CA, ja-JP, de-DE, zh-HK, it-IT, zh-CN, en-GB, es-MX, id-ID, es-ES, de-AT, en-AU, vi-VN). - Implemented automatic language detection with fallback to browser/local storage. - Added localized date formatting for various locales. - Added fallback mapping for regional variants (e.g. zh-TW -> zh-HK, es-AR -> es-ES). - Updated HTML/JS templates to use injected translations. - Fixed SyntaxWarning in regex strings. - Verified frontend rendering with Playwright. Co-authored-by: Fu-Jie <33599649+Fu-Jie@users.noreply.github.com>
This commit is contained in:
@@ -1245,6 +1245,7 @@ class Action:
|
||||
}
|
||||
# Fallback mapping for variants not in TRANSLATIONS keys
|
||||
self.fallback_map = {
|
||||
"zh-TW": "zh-HK",
|
||||
"es-AR": "es-ES",
|
||||
"es-MX": "es-ES",
|
||||
"fr-CA": "fr-FR",
|
||||
|
||||
Reference in New Issue
Block a user