feat(i18n): add Hungarian and Traditional Chinese locales

Complete and revise every shipped locale against the current English source, preserve locale-specific plurals, and map script-specific Chinese locales through device, Intl, duration, and Plex boundaries.

Co-authored-by: emgeje <mgj@mgj.hu>

Co-authored-by: junyou1998 <junyou1998@gmail.com>
This commit is contained in:
edde746
2026-07-24 07:30:43 +02:00
co-authored by emgeje junyou1998
parent 0c6dab01b3
commit ad7ef112fc
50 changed files with 19973 additions and 9320 deletions
+27
View File
@@ -2,6 +2,7 @@ import 'dart:async';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:plezy/i18n/strings.g.dart';
import 'package:plezy/models/audio_quality_preset.dart';
import 'package:plezy/models/hotkey_model.dart';
import 'package:plezy/services/base_shared_preferences_service.dart';
@@ -164,6 +165,32 @@ void main() {
});
});
group('SettingsService app locale', () {
test('persists script-specific locales by enum name', () async {
var settings = await SettingsService.getInstance();
await settings.write(SettingsService.appLocale, AppLocale.zhHant);
expect(settings.prefs.getString(SettingsService.appLocale.key), 'zhHant');
BaseSharedPreferencesService.resetForTesting();
SettingsService.resetForTesting();
settings = await SettingsService.getInstance();
expect(settings.read(SettingsService.appLocale), AppLocale.zhHant);
});
test('continues to read legacy language-code values', () async {
var settings = await SettingsService.getInstance();
await settings.prefs.setString(SettingsService.appLocale.key, 'zh');
BaseSharedPreferencesService.resetForTesting();
SettingsService.resetForTesting();
settings = await SettingsService.getInstance();
expect(settings.read(SettingsService.appLocale), AppLocale.zh);
});
});
group('SettingsService platform gates', () {
test('audio passthrough stays available on desktop and Apple TV', () {
expect(PlatformDetector.supportsAudioPassthrough(), isTrue);