Closed Bisaloo closed 2 months ago
Thanks, @Bisaloo. The translation looks great and will be useful for Spanish-, Portuguese- and French-speaking countries in LAC also. We have some questions regarding the regional configuration of R that a user may have.
From what we understand, potools
identifies the locale using Sys.getlocale() to choose the appropriate translation for the users. We also found that users can change their regional configuration using Sys.setlocale().
Then, when a user has its configuration in English (for expample) but wants to use epiCo (exclusively) in Spanish, without changing the configuration: should we ask the user to adjust their locale settings before using epiCo, or is it something we can handle within epiCo's functions?
Then, when a user has its configuration in English (for expample) but wants to use epiCo (exclusively) in Spanish, without changing the configuration: should we ask the user to adjust their locale settings before using epiCo, or is it something we can handle within epiCo's functions?
Not easily, because the expectation is that users would likely prefer having the same language for all packages.
If this assumption is not verified, we could work around it by:
withr::with_language("es", epiCo:: ...)
language
argument and use withr::local_language("es")
internally within the epiCo source code @Juanmontenegro99 I think the changed files are ok, as well as the translatons.
However, @Bisaloo, we have not been able to get the plot in the system configuration (spanish)
Here is an screenshot of R messages being displayed in spanish (after using the Sys.setlocale("LC_ALL", "es_ES")
and/or withr::local_language("es")
)
Could you help us reviewing the po files? Thanks!
Thanks for the report! It should be fixed with 22a77fb
(#140).
Fix #138
Todo:
po/R-es.po
filedescribe_ethnicity()
as well.po
files into.mo
withpotools::po_compile()
@juan-umana @Juanmontenegro99, this is a starting point to fix #138 using what we discussed yesterday in the development meeting (https://michaelchirico.github.io/potools/). Could you have a look and take this PR from here by finalizing the todos if you agree with this change.
It removes a large portion of duplicated code so it's an important improvement in terms of maintainability