Skip to content

Adding translations to langauge files #10170

Open
@imajit

Description

@imajit

I'm pleased so many fresh FTOs relating to the Translation Project are being generated.
I'd like to take a moment to clarify the flow of the translation project for new contributors, which will hopefully help you understand how your contributions affect the organization and where new FTO issues can be created.

  • Each file in https://github.com/publiclab/plots2/tree/main/config/locales directory is a language file that stores translations in key-value like format where key helps translation function identify each string uniquely and value is the translation.
  • Each file is mapped with a resource file in the Transifex project where en.yml file acts as a source file and other files are translation files.
  • All the keys in en.yml file are reflected on the Transifex dashboard and translators can add translations to the strings there.
  • To add strings that need translation, you can add a key-value pair in en.yml file and Transifex automatically syncs it with the resource files.
  • Other language files are not automatically synced, so any changes to these files will not be reflected in the Transifex project. To sync these files you need access to the Transifex project. You can read more about this here
  • Once we have the key-value pair in en.yml file, we can replace all the occurrences where the string is hard-coded with a translation function.
  • Once the changes are published, you can see the translated strings on https://publiclab.org/dashboard by switching language using dropdown present in the footer of the site.
    I see some concerns with adding translations directly to the language file; this is not the best approach because changes will not be reflected in Transifex and will cause merge conflicts when syncing with Transifex.
    I understand that adding translations directly to the files speeds up the project, however many of the project's translators may not be familiar with Github or yml files, and may prefer to add and approve translations through Transifex Project.
    Here are some possible ways to create FTOs Adding new strings for Translation #9945 and a detailed wiki related to Translation Project and a wiki about all the components involved in the Project here

Metadata

Metadata

Assignees

No one assigned

    Labels

    Translation Systemissues which involve adding new translations, improving the translation system

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions