the localization for PELD - #76
Conversation
| text=tr( | ||
| "To use a different character for fleet mode, choose a different\n" | ||
| ) + tr(" character in the 'Character...' menu on the main window")) |
There was a problem hiding this comment.
Should this be a single translation string?
There was a problem hiding this comment.
yes, I think i used "global replace" to wrap the strings. If you need this i can fix it.
| buttonFrame.grid(row="100", column="0", columnspan="10") | ||
| self.loginButton = tk.Button(buttonFrame, text=" Login ", command=self.login) | ||
| self.loginButton = tk.Button(buttonFrame, | ||
| text=" Login ", |
There was a problem hiding this comment.
This is my own i18n inexperience, but are commands like 'Login', 'Cancel', 'OK', universally understood?
There was a problem hiding this comment.
Sorry! Looks like they are missed. Gotta check them all again! 😝
| settings.lowCPUMode = True | ||
| self.mainWindow.topLabel.configure(text="Fleet Mode (" + self.characterName + ")") | ||
| self.mainWindow.topLabel.configure( | ||
| text="Fleet Mode ({0})".format(self.characterName)) |
There was a problem hiding this comment.
Probably want to translate this as well
| def convertNumberToStr(self, number): | ||
| decimals = int(self.decimalPlaces) | ||
| formatString = '{:,.'+str(decimals)+'f}' | ||
| formatString = '{:,.' + str(decimals) + 'f}' |
There was a problem hiding this comment.
Note: We may want to i18n displaying numbers in the future as well. Not needed for this PR I think.
| tr("Applying settings while in 'Low CPU Fleet Mode'") + | ||
| tr(" will not apply until after you end Fleet Mode.\n\n") + |
There was a problem hiding this comment.
probably merge these translation strings too
|
First: Thanks for the PR! It's a lot of work to go through this code that has architecture as more of an afterthought. I'm still going through the code changes here, but just some general thoughts/questions so far: I think some of your path checking stuff in your I'm torn on if I commented on a couple areas where I think multiple smaller translation strings should be merged into one larger translation string. This will help prevent mis-translations due to loss of critical context. There are probably other areas too, I haven't finished looking. Some areas certainly make sense to split up as they either contain whole thoughts/sentences or have reusable sections. I'm not sure I can see an easy way for a user to change PELD's language looking at your code. I was envisioning something in the settings window, or perhaps auto-detection based on the OS language, but I don't see that in your PR. Nor do I see a language file for Chinese. It appears to me the PELD would just use whatever default language file is there. |
|
Thank you for your review!
|
…dd sys.__MEIPASS processing stuff for consistency
|
Hi |
|
Thanks for the update! I'll give it a full look soon. |
|
The changes look good! The only thing left I really want out of this is to have a single version of PELD for both Chinese and English users. As mentioned, ideally this would choose a default that makes sense based off the operating system language, and could be changed in the settings window to override that default. If you don't want to do that, that's no problem, I can add the finishing touches on here. Just let me know what you'd like to do. |
|
Thank you for the comments! |
Sorry! My new job has been quite busy 😢 :
This pr is about a solution for localization of PELD, now PELD can be customed to display different languages in its GUI (if all things go well)
The solution is simple, and i placed the discription in
lang/INSTRUCTIONS.md.This pr includes many changes because most of the files need to
importthe newlocalization.py. Some other format changes are made auto byyapfwithpylint.