-
-
Notifications
You must be signed in to change notification settings - Fork 139
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
Create bug-free i18n API #473
base: master
Are you sure you want to change the base?
Conversation
It could be an object (like, not yet reached the end and found a string), which wouldn't work here
remnants of before i discovered `PackageManager::getAvailablePackages`
In addition to regular `label` key in a menu item, you can now have a `localisedLabel` key. This can either point to a key, or can point to an object, with properties `key` and `opts` for values to interpolate.
loading is done at startup if present, saving not yet implemented
Move them all to the dynamic place, so that its consistently in one place, and remove the last 2 settings that aren't currently in use
Provided as second argument, so, `activate(_, { t })`
Co-authored-by: confused-Techie <[email protected]>
This is called once in the constructor, then again in `initialize`. The constructor call was too early, and `i18n.t` had not been available yet, but it was used by `loadBundledKeymaps`.
rebased onto master (I got a bit really annoyed with git) |
All the failures are consistently failing on https://github.com/pulsar-edit/pulsar/blob/i18n/packages/background-tips/lib/tips.js#L3 for some reason |
thought about renaming that function from `buildAtomEnvironment` to `setupAtomEnvironment` because it now sets everything up including putting it onto `window.atom` but i don't wanna touch that ueeeeee
grammar-selector is causing t to be called for `language-test`, which isn't available in `packages.find(p => p.name === ns);` for whatever reason <ignore this>
@@ -242,7 +241,8 @@ module.exports = MenuManager = class MenuManager { | |||
} | |||
|
|||
sortPackagesMenu() { | |||
const packagesMenu = _.find(this.template, ({id}) => MenuHelpers.normalizeLabel(id) === 'Packages'); | |||
let packagesLabel = this.i18n.t("core.menu.packages.self"); |
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.
let packagesLabel = this.i18n.t("core.menu.packages.self"); | |
const packagesLabel = this.i18n.t("core.menu.packages.self"); |
superceded by #715 (I want to keep the branch around for now, Just In Case™ I want to reference something from it, will delete after I'm sure I don't need it anymore) |
PR #446 could have used a bit more testing/validation
(and actually looking at the CI)before merging, and so its been reverted now. This is attempt 2, we try to bug fix and make sure it doesn't break Pulsar before merging.