-
Notifications
You must be signed in to change notification settings - Fork 43
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
feat(stdlib,exts): implement Tr #578
Conversation
import { XmlDocument } from "xmldoc"; | ||
|
||
/** | ||
* Supported locales in RBI. |
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 don't know that we need to enforce this, we could just grab whatever subdirectories exist in the locale/
directory. But it made traversal a little easier 🤷
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 have a few questions but this is looking great
* locale has been specified, use that. Otherwise, default to the Node process. | ||
*/ | ||
public static get locale(): string { | ||
return RoDeviceInfo._locale || process.env.LOCALE || ""; |
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.
Nice!
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.
Looks great! We may be missing a few bits of the TS file spec (and we don't seem to support XLIFF files yet) but we can handle those in a separate PR as needed.
Nice work @lkipke !
Yep, that was my thought as well 👍 |
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 didn't have enough coffee when checking this PR yesterday, things look great!
Hi @lkipke , I've tried to call Tr without mocking but I'm receiving the translations source like: "HELLO_WORLD" but not the translated text "Hello, world!", error is not present anymore, but looks like Tr not working properly( |
Hey @nadiapadalka — please don't post references to confidential materials here, including translations. I'm redacting parts of your comment. |
@nadiapadalka That may be solved by #587 , which was released in v0.39.0. Please try again with that version of the interpreter. If you still see that error, please file a new issue with the simplest file(s) you can find that reproduce the issue 😃 |
@sjbarag , sure, sorry |
thanks @sjbarag ok, I will try |
Summary
This implements the stdlib
Tr
function (link to docs). Closes #496