Project

General

Profile

Plugins Directory » Redmine Translation Terms

Author: Massimo Rossello
Website: https://github.com/maxrossello/redmine_translation_terms/blob/master/README.md
Code repository: https://github.com/maxrossello/redmine_translation_terms/tree/master
Registered on: 2019-01-13 (about 5 years ago)
Current version: 5.1.0
Compatible with: Redmine 5.1.x
User ratings:   (0)

Redmine Translation Terms

En, en-GB and it locales are supported.

Ever wanted to address your Redmine installation to a more specific scope? Terms like issue or project may be too generic if you want to target e.g. activities, opportunities, customer requests or work packages within e.g. workgroups, scopes or organizational levels.

This plugin allows to customize specific terms in Redmine translations, and allows third party plugins to support translations containing customizable terms.
It offers a second layer of translation adding interpolations and related definitions to substitute specific terms.

Several terms are thus made replaceable. Moreover, each language comes with its own set of specific terms, to cope with gender differences impacting surrounding words too (e.g. articles and adjectives in italian).

Overview

Redmine uses terms as generic as possible, like issue, to cover all use cases it can manage. However, if you use Redmine for specific purposes, you might like to use different, more specific, terms.

This plugin offers a second layer of translation via files placed under config/elocales (en, en-GB and it locales are supported) which override a subset of the terms that come with Redmine. It also provides interpolated terms under config/overrides/<locale>/000.yml, containing the default translations as they come from Redmine. So by default, nothing changes. You can add newer redefinitions of overridden terms in additional files under the same path, in this plugin or in your own preferred one. The interpolated terms files are taken in filename lexical order, so e.g. definitions in 001.yml will be taken over those of 000.yml, irrespective of the plugin where they are provided. Of course, overrides under the locale of the current user will be only considered.

Third party plugins can also support flexible translation terms, if they provide config/elocales definitions along with config/locales, so to support normal translation if this plugin is not installed, or flexible translation if it is.

Note that some locales, like italian, require a different translation of surrounding terms such as articles, adjectives, etc.. Also, some articles are ellipsed if used before terms starting with a vocal letter. Therefore, if you e.g. change a male term into a female one, also those surrounding terms need related translation. For this reason, the elocales are rather different for each language.

Features

  • provide default Redmine translations with interpolations for terms like issue, project, status, etc., and possibly for surrounding words like articles and adjectives when changing the word gender would impact them also
  • replace interpolated terms with overrides defined in any plugin. Default overrides match the default Redmine terms
  • overriding interpolation files are taken in order according to lexicographic order of the filename. As a convention, XXX.yml should be used as a filename, where XXX are 3-digit numbers.

How to customize terms over Redmine translations

  • Set the current directory to config/overrides/<locale> within this plugin or your own
  • Copy the existing 000.yml to ./XXX.yml, where XXX is a 3-digit number defining the priority of your definitions: the higher number the higher priority. Better to avoid to create 999.yml, so to leave more space for further overrides.
  • Filter out the definitions that you do not want to change. This way, a lower priority file will be able to apply its changes for things that you do not want to touch
  • Apply your own definitions over remaining terms

How to support customizable terms in your plugin

  • provide translation files under config/locales as usual, for working properly when this plugin is not installed. If you don't, you should require this plugin explicitly in your init.rb. See Redmine documentation for more information
  • copy your locales under config/elocales
  • for each overridable term listed in 000.yml, edit the translations so to apply an interpolation. For example, whenever you print issue you should replace the word with %{issue}, and whenever you print issue(s) you should replace the word with %{issue_or_issues}
  • you can support more overridable terms in your plugin, but if they are also used in base Redmine, you should add interpolated definitions for Redmine terms also. For example, you can support a new %{my_term} term in your elocales; if the translation is used in Redmine terms too, then you shall add them to your elocales with proper substitution of %{my_term} so that the translation remains consistent

Installation notes

Place the plugin code under the plugins directory and restart your server.

cd {redmine root}
git clone https://github.com/maxrossello/redmine_translation_terms.git plugins/translation_terms

Changelog

5.1.0 (2023-12-10)

Compatible with Redmine 5.1.x.

https://github.com/maxrossello/redmine_translation_terms/releases/tag/translation_terms-5.1.0

Support for Redmine 5.1.x.

Compatible for same release until new version. Check at https://github.com/maxrossello/redmine_testsuites/releases.

5.0.6 (2023-10-21)

Compatible with Redmine 5.0.x.

https://github.com/maxrossello/redmine_translation_terms/releases/tag/translation_terms-5.0.6

Compatible for same release until new version. Check at https://github.com/maxrossello/redmine_testsuites/releases.

4.2.11 (2023-10-21)

Compatible with Redmine 4.2.x.

https://github.com/maxrossello/redmine_translation_terms/releases/tag/translation_terms-4.2.11

Compatible for same release until new version. Check at https://github.com/maxrossello/redmine_testsuites/releases.

3.4.7 (2019-01-04)

Compatible with Redmine 3.4.x.

redmine_translation_terms_3.4.7.zip (36.5 KB) redmine_translation_terms_3.4.7.zip Massimo Rossello, 2019-01-13 13:30