-
Notifications
You must be signed in to change notification settings - Fork 602
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
add multisite translation keys #4437
Conversation
modules/@apostrophecms/multisite-i18n/i18n/aposMultisite/en.json
Outdated
Show resolved
Hide resolved
@@ -38,7 +38,7 @@ | |||
<AposIndicator | |||
icon="help-circle-icon" | |||
class="apos-field__help-tooltip__icon" | |||
:tooltip="field.help || field.htmlHelp" | |||
:tooltip="help" |
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.
never was translated, it seems!
// Build interpolation object when a translation key contains interpolations | ||
// following this pattern: "aTranslationKey|foo=bar|fizz=buzz". | ||
// i18n will be given the "aTranslationKey" key with following object: | ||
// { foo: "bar", fizz: "buzz" } | ||
// | ||
// Usage example: | ||
// | ||
// ``` | ||
// help: `aposMultisite:shortNameHelp|baseDomain=${self.baseDomain}` | ||
// ``` |
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.
@boutell what do you think? I tried to come up with a simple solution to add interpolations in the help
and htmlHelp
attributes.
I thought it would be useless to have this system for labels, since we're less likely to add dynamic values in those than in help texts.
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.
CHANGELOG.md
Outdated
### Adds | ||
|
||
* Add translation keys used by the multisite pro module. | ||
* Add the possibility to set dynamic values in the fields' `help` and `htmlHelp` attributes following this pattern: `translationKey|foo=bar|fizz=buzz`, |
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.
cf https://github.com/apostrophecms/apostrophe/pull/4437/files#r1502556802
will need a cypress test if we continue with this solution
@@ -38,7 +38,7 @@ | |||
<AposIndicator | |||
icon="help-circle-icon" | |||
class="apos-field__help-tooltip__icon" | |||
:tooltip="field.help || field.htmlHelp" | |||
:tooltip="$t(field.help || field.htmlHelp)" |
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.
was not translated
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.
!! Good catch
CHANGELOG.md
Outdated
|
||
### Adds | ||
|
||
* Add translation keys used by the multisite pro module. |
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.
call it the multisite assembly module. We don't want people who get Pro licenses to think it is included. It's in the Pro namespace, yes I know, but that's just how npm works.
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.
Please add a changelog entry about the fix to allow localization of help
and htmlHelp
.
@@ -38,7 +38,7 @@ | |||
<AposIndicator | |||
icon="help-circle-icon" | |||
class="apos-field__help-tooltip__icon" | |||
:tooltip="field.help || field.htmlHelp" | |||
:tooltip="$t(field.help || field.htmlHelp)" |
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.
!! Good catch
CHANGELOG.md
Outdated
|
||
### Adds | ||
|
||
* Add translation keys used by the multisite pro module. |
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.
Please add a changelog entry about the fix to allow localization of help
and htmlHelp
.
Summary
cf https://github.com/apostrophecms/multisite/pull/107
What kind of change does this PR introduce?
(Check at least one)
Make sure the PR fulfills these requirements:
If adding a new feature without an already open issue, it's best to open a feature request issue first and wait for approval before working on it.
Other information: