-
-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Categories translation #4418
Comments
Yes, I thought so too, but Lisheng insisted on translating categories. Now, I'm leaning towards that opinion too.
And that doesn't work either. I have an OS with an English interface. Initially, when mmex is launched, there is no way to select a language. We have to create an empty database. After that, it is possible to switch the language. Finally, you can create a database for the selected language. But the categories turn out to be without translation. |
I don't like the idea of potentially changing, based on translation, something that a user can edit. Perhaps at first start we pop a dialog saying "Do you want to create a default set of categories" if the user says YES then ask what language to use? |
Yep seems a good suggestion. |
Have added the option to change language at startup. However, I can't seem to get categories created in the required language when I create the DB? Am I doing something odd here? |
fix(#4418): change language at startup
There is no translation of categories when inserted into the database. The idea of translating categories at the UI level won earlier. |
Oh, thought I saw it in the DB code! |
https://github.com/moneymanagerex/moneymanagerex/blob/master/src/db/DB_Table_Category_V1.h#L111-L126 wxTRANSLATE does not translate the string. Do not confuse it with _(...) and wxGetTranslation(...) The Python script util/sqlite2cpp generates this code. In it, you need to replace wxTRANSLATE with _. |
Yep, that was what clouded my mind. |
@vomikan I also noticed when I ran the python script (was going to update the repo held src/db files before your above commit :-) ) that BD_Table_Currenyformats also had wxTRANSLATE for the currency names that is also now changed. Are your files hand-edited? Any reason why the Currencyformats have been excluded? I see the appveyor/travis scripts always rebuild these files. (I think it would be good to update these to python3 compatible scripts at some point). |
@whalley I didn't use the script. It works correctly, but generates another file. I did not deal with this problem. Because the build is not done automatically for MAC, then you can leave a manual fix. |
I think it's worth doing this. |
@whalley I think it's better to do everything with a script. Was there a conflict after I changed the file manually? |
There was no 'conflict' it was just that you had not manually updated the 'BD_Table_Currenyformats.h' file. I did regenerate everything from the script. it is just that for people who check out the code and build manually we need to keep the header files updated and hence run the script after we make changes and commit - that is all I did. If we force everyone to use a script then we should remove the generated headers from the repo, otherwise, we need to re-generate when we make a change that affects them. |
@vomikan Should I create a pull request of this - whalley@192ae05 |
Yes, please |
fix(#4418): rebuild from python script
All categories are subject to translation. But in the categories dialog, when you enable any language other than English, all categories are displayed without translation.
db/DB_Table_Category_V1.h:117
Moreover, if this is corrected, there may be a conflict with the algorithm for saving the transaction filter settings. Although not a fact.
The text was updated successfully, but these errors were encountered: