SankethBK / diaryvault

A personal diary application written in Flutter
https://play.google.com/store/apps/details?id=me.sankethbk.dairyapp
MIT License
114 stars 73 forks source link

Translation Contributions: Help Us Translate DiaryVault into Your Language #212

Open SankethBK opened 1 month ago

SankethBK commented 1 month ago

Steps to Add a New Language Translation

  1. Get the Language Code:

  2. Create a .arb File:

    • Navigate to the lib/l10n/ directory in the project.
    • Create a new .arb file named intl_<language_code>.arb.
      • For example, if you are contributing Spanish translations, your filename would be intl_es.arb.

Note: Only make changes in .arb files. Files inside generated/intl folder are autogenerated by Flutter Intls Vscode extension.

  1. Translate Messages:

    • Use the template file intl_en.arb as a reference.
    • Inside this file, you will find key-value pairs where the keys should remain the same.
    • Translate the corresponding values into your target language in your new .arb file.
      • Example:
      • In intl_en.arb:
        {
        "enterNewEmail": "Enter new email"
        }
      • In intl_es.arb:
        {
          "enterNewEmail": "Introduce un nuevo correo electrónico",
        }
  2. Install Flutter Intl Extension:

    • Install the Flutter Intl extension for Visual Studio Code.
    • This extension helps with generating boilerplate code and keeps localization files in sync.
  3. Regenerate Localization Files:

    • If you're using the Flutter Intl Vscode extension, it should automatically generate the necessary files.
  4. Test Your Translations:

    • Run the app and change the device or emulator language to your target language.
    • Verify that all translations appear correctly in the app.
  5. Submit a Pull Request:

    • Commit your changes and push them to your forked repository.
    • Submit a pull request to the main repository for review.

Additional Notes

rsg-devghost commented 1 month ago

Hey @SankethBK , would like to contribute on this issue.

SankethBK commented 1 month ago

@rsg-devghost yes, please go ahead. Just mention what you'll be contributing to avoid conflict

rsg-devghost commented 1 month ago

Sure, just a simple doubt , are some of the language translations incomplete?. If so i would like to complete, "Kannada - kn" for instance. Also I would like to add 2 languages "Russian - ru" and "Bengali Bangla - bn".

SankethBK commented 1 month ago

Yes, most of them are incomplete.

rsg-devghost commented 1 month ago

No problem, I'll do the Kannada translations, and add both Russian and Bengali languages.