Customizing budget lines translations
GobiertoBudgets module displays budget lines information across the years. Although Gobierto provides a default dictionary of categories and subcategories in the supported locales, sometimes the organizations have a highly specialized dictionary of subcategories (specially in levels 3 and 4).
Gobierto provides two useful tools to add custom translations:
Find missing categories
Go to you gobierto folder and run:
bin/rails gobierto_budgets:missing_categories:check[mydomain.test]
Where mydomain.test
should be one of the sites configured. The output will show a message like:
- Written file /tmp/missing_categories_1.csv
That file is a plain CSV with these columns:
- Area: (E, economic, F, functional, or C, custom)
- Tipo: (G, gasto, expenses or I, ingreso, income)
- Codigo: the budget line code
- Nombre
- Descripcion
Upload custom categories
Gobierto provides a task to upload a CSV like the one described above and customize budget categories.
rails gobierto_budgets:custom_categories:import[site_domain,file_path,locale]
Where:
site_domain
should be the domain of one of the sitesfile_path
should be the path to the categories filelocale
should be one of the valid locales (ca, en, or es)
If a category is not found in a locale, the search will fallback to other locales.
Updated over 5 years ago