Import the local pages as GlotPress' projects#1856
Import the local pages as GlotPress' projects#1856amieiro wants to merge 132 commits intoGlotPress:localfrom
Conversation
- Development - Continents and cities - Administration - Network admin
… translations strings
* Add the backend with settings and a list with local items (core, plugins, themes) * Save the checkbox value to enable local translations * Add a message to hide the local translations if you have not enable them * Add the originals and the translations strings for the core * Split the translate_core method in smaller methods * Add the 4 WordPress core subprojects and the main project. * Add the functionality to translate locally a plugin * Add the functionality to translate locally a theme * Redirect to the selected plugin or theme, not to the main project * Add the nonces in the URL and their checks * Add some checks * Download the .po and .mo files from translate.w.org if they don't exist locally * Redirect to the locale in the plugins and themes * Check if the file downloaded from DotOrg has fired an error * Add the local "languages" folder inside the plugins and themes to look for .po files * Initial import of community-translator * Preload translations * Make saving work * Fix lint errors * JS Lint fixes * Fix eslint errors * Update for new eslint settings * Incorporate text domain namespacing more deeply * Lint fixes * Lint fix * fix warning * Fix wrong parameter sequence * typo * Fix original lookup * Speedup initial tree walking * Looku placeholders * Show user translations * Modify translation after saving * Fix linting * Prioritize found translations when the context is dubious * Remove help icon for now * Expose the text domain for translations that were not found * Don't replace placeholders as if they were new translations --------- Co-authored-by: Jesús Amieiro <1667814+amieiro@users.noreply.github.com>
* Implement a REST API for saving translations * Remove some outdated default settings
* Inline Translation: Make it work in the customizer * lint
* Improve multi-placeholder translation replacement * Fix case where the output text was already a translation * lint * Unify project creation * Continued unification * Improve behavior with an empty Local GlotPress * Fix insertion of JS placeholders * Improve button text * Update assets * Fix rebase error * Lint fixes * Add a welcome page * Lint fixes * typo * Rename WordPress project to just WordPress * Make more strings translatable * Allow some HTML in descriptions * Fix lint * Require local GlotPress to be active for inline translation * Fix lint * Remove actions column if there are no actions * Replace modified strings back in again * Fix another edge case with reinsering translations * Fix another edge case
* Add a Sync to w.org view * Rename to Contribute back * Linting * Prototype the translation processing * Generate PO files * Filter the target URL
Only works for the root blocks, not for the nested.
…d block when we export them to the translated page
|
Thinking about using Playground for editing WordPress Documentation, one of the possible data flows is importing markdown documentation files from a GitHub repository into Playground, making edits, and then creating a Pull Request directly from Playground. I wonder how we could make the two workflows compatible, so enable translating documentation pages brought over from markdown files from GitHub. We have a two-way markdown<->blocks conversion pipeline at https://github.com/dmsnell/blocky-formats so we can reason about blocks instead of text paragraphs. Would that suffice? Or would we have store some additional structured data in the repo to cross-reference paragraphs/blocks from different markdown files? |
|
@amieiro and I discussed that the current implementation on writing Possible solution: add the metadata to the block attribute json (for example as fake css class names so that they remain after editing the page gp-original-123) and convert it to a element upon output by getting the data from the database. A positive aspect of this is that we can do this transformation only for people with permission (= logged in users). |
|
Would the meta attribute work? Or storing it as a block binding? |
Problem
The WordPress.org projects needs to be able to translate the documentation from English to another languages. We have had a few meetings (WCEU 2023, WCEU 2024) and we want to test GlotPress as the translation engine.
Solution
This PR is a first step, doing these steps:
Screenshots or screencast
Local GlotPress
Original page
Translation page in GlotPress
Translated page