Currently, the texts to be translated are scattered in each file and often contain duplicates.
Each python file should have a corresponding python file in the locales folder with dictionaries containing the strings. This will facilitate translation updates later and avoid duplicates.
# Files for translations should look like this
# ./locales/actions.py
{
'fr_FR': {
'acknowledged': 'reconnu',
'downtimed': 'arrêt programmé',
}
'en_US': {
'acknowledged': 'acknowledge',
'downtimed': 'downtime',
}
}
# Then call by a function in each file
get_actionstext('fr_FR', 'acknowledged')
Currently, the texts to be translated are scattered in each file and often contain duplicates.
Each python file should have a corresponding python file in the
locales
folder with dictionaries containing the strings. This will facilitate translation updates later and avoid duplicates.