Skip to content

Add a CLI tool for marking locale keys as fuzzy #12501

@kaitlinnewson

Description

@kaitlinnewson

Description:

One task that developers may need to do when they are editing locale keys is to mark the key as "fuzzy" in other languages when the English text is changed, meaning it needs to be reviewed by translators. This can be automated with a script, similar to other locale tools we have in lib/pkp/tools.

We should not mark keys as fuzzy in the en files as that can cause issues with Weblate, and that is the string the developer is typically modifying.

This will target 3.5 and 3.6/main as 3.5 is the current branch connected to weblate.

Documentation will also be added to https://docs.pkp.sfu.ca/dev/documentation/en/resources.

Steps to test the changes:

As this is a command-line tool only targeted at developers, there will be no UI aspects to test. The command to run (from the root directory of the application) is:

php lib/pkp/tools/markLocaleKeyFuzzy.php example.locale.key

What application are you using?
OJS, OMP or OPS 3.5/3.6 (main)

Pull Requests

Submodule updates/tests

Metadata

Metadata

Assignees

Labels

Enhancement:1:MinorA new feature or improvement that can be implemented in less than 3 days.

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions