Skip to content
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

Merged
merged 9 commits into from
Feb 26, 2024
Merged

add multisite translation keys #4437

merged 9 commits into from
Feb 26, 2024

Conversation

ETLaurent
Copy link
Contributor

@ETLaurent ETLaurent commented Feb 23, 2024

Summary

  • Add translation keys used by the multisite pro module.

cf https://github.com/apostrophecms/multisite/pull/107

What kind of change does this PR introduce?

(Check at least one)

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Build-related changes
  • Other

Make sure the PR fulfills these requirements:

  • It includes a) the existing issue ID being resolved, b) a convincing reason for adding this feature, or c) a clear description of the bug it resolves
  • The changelog is updated
  • Related documentation has been updated
  • Related tests have been updated

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:

@@ -38,7 +38,7 @@
<AposIndicator
icon="help-circle-icon"
class="apos-field__help-tooltip__icon"
:tooltip="field.help || field.htmlHelp"
:tooltip="help"
Copy link
Contributor Author

@ETLaurent ETLaurent Feb 26, 2024

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!

Comment on lines 70 to 79
// 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}`
// ```
Copy link
Contributor Author

@ETLaurent ETLaurent Feb 26, 2024

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.

Copy link
Contributor Author

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`,
Copy link
Contributor Author

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

@ETLaurent ETLaurent requested a review from boutell February 26, 2024 12:51
@ETLaurent ETLaurent marked this pull request as ready for review February 26, 2024 12:51
@@ -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)"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was not translated

Copy link
Member

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.
Copy link
Member

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.

Copy link
Member

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)"
Copy link
Member

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.
Copy link
Member

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.

@ETLaurent ETLaurent requested a review from boutell February 26, 2024 14:34
@ETLaurent ETLaurent merged commit 696a1cc into main Feb 26, 2024
8 checks passed
@ETLaurent ETLaurent deleted the pro-5646-multisite-i18n branch February 26, 2024 16:06
haroun added a commit that referenced this pull request Feb 27, 2024
* main:
  add multisite translation keys and fix tooltip translation (#4437)
  release 3.63.1
  release 3.63.0
  Show widget icons in the editor
  fix admin bar spacer height when context bar is conditionally displayed (#4424)
@ETLaurent ETLaurent mentioned this pull request Jun 17, 2024
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants