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

i18n polishing #5542

Merged
merged 10 commits into from
Jan 12, 2024
Merged

i18n polishing #5542

merged 10 commits into from
Jan 12, 2024

Conversation

erral
Copy link
Member

@erral erral commented Dec 15, 2023

I have been working on polishing the po file generation to align with Weblate. They are mainly cosmetic changes, but this way we create the same po file structure that we are using in plone.app.locales, and we avoid Weblate doing a lot of changes each time there is a PR (changes like putting first the file the msgid comes from instead of the default message)

  • Changed the # defaultMessage: xxxx header with #. Default: "xxx".
  • Changed the order of the default message and the "source" of the msgid
  • Changed the order of the MIME-Version header.
  • Fixed 2 msgids and default values that in Volto had newlines, so they couldn't be properly translated.

Generated PO files are still valid and can be edited with other tools like Poedit, for instance.

If you find the PR OK, after it's merged I will work on Weblate integration.

Copy link

netlify bot commented Dec 15, 2023

Deploy Preview for volto canceled.

Name Link
🔨 Latest commit b361551
🔍 Latest deploy log https://app.netlify.com/sites/volto/deploys/659f9095076a5900080ec2f5

@stevepiercy
Copy link
Collaborator

Will this PR result in a change to how developers currently work on translations, specifically in Internationalization?

@erral
Copy link
Member Author

erral commented Dec 15, 2023

No, they can continue working like they work today.

There are no changes on the way Volto code is internationalized.

They can even continue working translating Volto editing directly the PO files.

No changes on that.

@stevepiercy
Copy link
Collaborator

Is there a plan to ask folks to translate Volto through Weblate? I just hunted down this https://hosted.weblate.org/projects/plone/volto-main/.

This looks to be an easier way for people to contribute translations, but would it bypass the Plone Contributor Agreement?

@erral
Copy link
Member Author

erral commented Dec 16, 2023

Yes the plan is to integrate Weblate too, but it is not mandatory, users can keep working on PO files too.

To tell the truth I didn't realize about the contributor5agreement to translate Volto. As it is not needed for plone.app.locales (it lives in collective), I didn't even thought about this.

But, i the CA is required, I would either retire Volto from Weblate or check if any User validation can be added there. Anyway, rigth now the contributions for Volto in Weblate are stopped.

Thanks for your heads up @stevepiercy

@stevepiercy
Copy link
Collaborator

I'm not a Contributor Agreement expert. Let's get @polyester's or another Plone Foundation member's opinion on making contributions of translations through Weblate. Weblate has stuff about agreeing to the license of the project, but nothing about a contributor agreement. If we could automate MrRoboto to check a contributor through Weblate just as it does now for GitHub, then that might be acceptable.

Copy link

netlify bot commented Dec 23, 2023

Deploy Preview for plone-components ready!

Name Link
🔨 Latest commit b361551
🔍 Latest deploy log https://app.netlify.com/sites/plone-components/deploys/659f9095ec80a70008c164ef
😎 Deploy Preview https://deploy-preview-5542--plone-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@davisagli davisagli left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@davisagli
Copy link
Member

@sneridagh Okay to merge?

@sneridagh sneridagh merged commit 6eea25e into main Jan 12, 2024
63 checks passed
@sneridagh sneridagh deleted the i18n-updates branch January 12, 2024 08:06
@sneridagh
Copy link
Member

@erral we will need a backport PR for 17 and 16, I guess.

@erral
Copy link
Member Author

erral commented Jan 12, 2024

Yes, I plan to connect Weblate only to main.

I can check the backport if the cherry-picking does not work.

@sneridagh
Copy link
Member

@erral @davisagli don't know if issue this one as breaking... since people using it are going to see changes in their .po (although they will be innocuous). What do you think?

@davisagli
Copy link
Member

@sneridagh Not breaking. The old .po format still works if they do not update it.

sneridagh added a commit that referenced this pull request Jan 17, 2024
* main: (1505 commits)
  Links references view cypress tests (#5111)
  Unify start command, trigger `build:deps` command too (#5633)
  Release generate-volto 9.0.0-alpha.3
  Release @plone/types 1.0.0-alpha.2
  Improve Blocks typings. Refactor `volto-coresandbox` to TS. (#5624)
  i18n polishing (#5542)
  Release @plone/scripts 3.2.1
  Fix @plone/scripts for 17 and below (#5613)
  Release @plone/scripts 3.2.0
  Enhance `ColorPickerWidget` (#5585)
  edit recurrence button is aligned properly (#5590)
  Revert "Attempt to build the volto/components Storybook only when something c…" (#5601)
  Revert "Added Storybook to Netlify build to allow relative links from documen…" (#5598)
  Added Storybook to Netlify build to allow relative links from documen… (#5596)
  Attempt to build the volto/components Storybook only when something c… (#5595)
  Pin mrs.developer to an updated version, never to star. (#5593)
  Allow to bail off the nested name build in the custom CSS properties style name generator (#5586)
  Clarify how CSS properties work (#5592)
  Release 18.0.0-alpha.6
  Release @plone/client 1.0.0-alpha.12
  ...
sneridagh added a commit that referenced this pull request Jan 21, 2024
* main: (39 commits)
  Attempt to build the components storybook only when its source files … (#5600)
  Added Storybook to Netlify build to allow relative links from documentation (#5599)
  Fix multilingual redirector (#5628) (#5665)
  Update ref from install-from-packages to create-project (#5654)
  Pin Vale to 2.30.0 to allow build of documentation until we can upgrade to v3.x (#5656)
  Temporarily pin `sphinxcontrib-*help` dependencies so docs can build (#5655)
  Merge the StyleWrapper styles with the draggable props from b-D&D (#5652)
  Fix order of preference in addons-registry for the theme (#5649)
  Unify variables in Makefile (#5637)
  Links references view cypress tests (#5111)
  Unify start command, trigger `build:deps` command too (#5633)
  Release generate-volto 9.0.0-alpha.3
  Release @plone/types 1.0.0-alpha.2
  Improve Blocks typings. Refactor `volto-coresandbox` to TS. (#5624)
  i18n polishing (#5542)
  Release @plone/scripts 3.2.1
  Fix @plone/scripts for 17 and below (#5613)
  Release @plone/scripts 3.2.0
  Enhance `ColorPickerWidget` (#5585)
  edit recurrence button is aligned properly (#5590)
  ...
sneridagh pushed a commit that referenced this pull request Jan 24, 2024
Co-authored-by: David Glick <david@glicksoftware.com>
sneridagh added a commit that referenced this pull request Jan 25, 2024
Co-authored-by: Mikel Larreategi <mlarreategi@codesyntax.com>
Co-authored-by: David Glick <david@glicksoftware.com>
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.

4 participants