-
-
Notifications
You must be signed in to change notification settings - Fork 92
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
Enhanced Internationalization Support (i18n) #1320
Conversation
I'll go through this one when I've got a good chunk of time free, possibly this weekend. I have had some additional thoughts on how we might make localisation a base feature in Pode as well, which other people can re-use - such as Pode.Web. For example, having strings available as |
Personally, I'll keep it separate. Pode.Web requirements are a bit different. You want the user to be able to i18n their application. In the context of Pode, it's more of a system thing. Sure, we can implement something that allows the user to i18n everything inside a Route, but it should differ from the exception message generated by Pode. I load the language in Pode.psm1 as first thing and assign the content to $global:msgTable. But we can add an additional variable for the user to use |
I've no idea why it's failing on Ubuntu. I tried on Centos and works fine |
Looks like the global message variable is not injected inside the runspace |
Add Korean additional messages migrated added a new UICulture property to the module `Import-Module -Name "Pode" -ArgumentList @{UICulture ='ko-KR'}` failback to English if culture doesn't exist
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've done a very quick scan, haven't had chance to validate the message/key remapping and translation messages yet
Add PodeLocal to runspaces
fix the tmpPodeLocale variable name
I tried to convert the Pode.psd1 to a hashtable
This is the error
|
I added some documentation to the Tutorial/Basic part. But I think to write also a getting started paragraph |
I've just tested this myself, and reproduced the error. It's because the sseConnectionNameRequiredExceptionMessage = An SSE connection Name is required, either from -Name or $WebEvent.Sse.Name In mine hashtable conversion: sseConnectionNameRequiredExceptionMessage = "An SSE connection Name is required, either from -Name or `$WebEvent.Sse.Name" Escaping the variables then allows the module to load and work without error |
I missed It. |
Question. Do you think the listener requires localization? I was looking the code, but I’m not seeing anything interesting that required to be localized |
Fix localization test plus fix 2 issues with PT and EN-GB localization
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Been through and double checked all the transactions, just a few issues with some of the translations where some might be better explicitly have the word "Schedule" instead of translating the word - as it's in direct reference to a Pode object
Semaphore is translated correctly
I'm working to fix the Italian translation because I speak Italian, but for the other language, we have to ask for help from the community on Discord |
Fair enough! |
I was not sure to use en-gb as international english or create a new one anyway I demoted en-us because Pode is born in UK not US :) fixed the Italian language content
I made en-gb the international English language. Italian psd1 is good to go |
let me know what you want to do we the other languages |
All looks good to me :) For the other languages outside of EN/IT: I have run them all through Google Translate, and they did all come back seemingly valid. If we want that extra level of assurance, we can ask on Discord if anyone is able to review the translations they know. Otherwise, I happy to approve/merge if there's nothing else to commit |
I don't have anything to add here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All work outside of the translations is good. We've a relatively high degree of confidence in the translation themselves, and we can fix after if anything is found.
Description of the Change
Enhanced Internationalization Support (i18n)
Related Issue
#1285