hotosm / osm-tasking-manager2

Designed and built for Humanitarian OpenStreetMap Team collaborative emergency/disaster mapping, the OSM Tasking Manager 2.0 divides an area into individual squares that can be rapidly mapped by thousands of volunteers.
http://tasks.hotosm.org
Other
425 stars 156 forks source link

Add context for translators #946

Open pgiraud opened 7 years ago

pgiraud commented 7 years ago

Here's a follow up to an issue reported on transifex. A user asked for more context on a translation string source. Some strings to translate are really short and don't really mean anything out of context. Using babel, it's already possible to add some comments along with translations string. They should then show up on the transifex interface.

Here's an example of how to use it: https://github.com/pgiraud/osm-tasking-manager2/blob/8b6741340fca838e450211e6106f5d88f1d83225/osmtm/templates/task.history.mako#L77-L78

By the way, the translation mechanism should be documented somewhere for the code contributors. See the good doc from CKan as an example. http://docs.ckan.org/en/latest/contributing/string-i18n.html