tsukumijima / Real-ESRGAN-GUI

Lovely Real-ESRGAN / Real-CUGAN GUI Wrapper
MIT License
468 stars 27 forks source link

Multilingual support (en-US) #2

Closed p1atdev closed 1 year ago

p1atdev commented 1 year ago

Added localization with easy_localization.

image

And some small fixes.

easy_localization を使って多言語対応をしました。

assets/translations に翻訳ファイルを追加し、main.dart で以下の部分を変更することで対応言語を増やすことができます。

  // アプリを起動
  runApp(
    // ローカライゼーション
    EasyLocalization(
        supportedLocales: const [Locale('en', 'US'), Locale('ja', 'JP')],
        path: 'assets/translations',
        fallbackLocale: const Locale('en', 'US'),
        child: const RealESRGanGUIApp()),
  );

英語は翻訳機にかけながらそれっぽくしただけなので、もしかしたら文法が間違っている部分があるかもしれないです。

他の変更点

私は Flutter はまだ不慣れなので良くない部分があったら修正していただけると幸いです。

kirill0ermakov commented 1 year ago

I don't know anything about programming, but you pointed it out correctly. I am also attaching the translation to add the correct translation for the Ukrainian version

Original image file = Оригінальний файл зображення Output image file = Вихідний файл зображення Model = Модель Scale = Шкала збільшення Format = Формат Select file = Обрати файл

p1atdev commented 1 year ago

I created a Ukrainian translation using DeepL. Please let me know if there are any unnatural translations.

image
tsukumijima commented 1 year ago

少しコードフォーマットなど気になる点もありますが、概ね問題なさそうなのでマージしたいと思います(あとでこちらで直します)。 プルリクエストありがとうございました!

kirill0ermakov commented 1 year ago

I created a Ukrainian translation using DeepL. Please let me know if there are any unnatural translations.

image

WOW! That's great, but have one error "Розпочати масштабування", you last type "я"

tsukumijima commented 1 year ago

@kirill0ermakov

WOW! That's great, but have one error "Розпочати масштабування", you last type "я"

This was caused by the Ukrainian text not fitting in the width of the button. The translation itself seems correct. I widened the width of the button slightly at https://github.com/tsukumijima/Real-ESRGAN-GUI/commit/f012177e829fd40214cdc4fea12d47fbf1411981. This allows the text to be displayed until the last "я".