feat: traduction automatique FR→EN des pages pagecontent via Albert IA#34
Open
nriss wants to merge 2 commits into
Open
feat: traduction automatique FR→EN des pages pagecontent via Albert IA#34nriss wants to merge 2 commits into
nriss wants to merge 2 commits into
Conversation
…via Albert IA Deux nouveaux inputs dans action.yml : - translate : false (défaut) / true (nouvelles pages) / force (tout retraduire) - albert_api_key : clé API Albert à passer depuis le workflow appelant (ALBERT_WORKFLOW_KEY) Les steps de traduction s'exécutent entre sushi et le publisher, garantissant que les pages traduites sont disponibles lors de la génération HTML. Ajout du script tools/translate_pages.py. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
| if: ${{ inputs.translate == 'true' || inputs.translate == 'force' }} | ||
| shell: bash | ||
| run: | | ||
| SRC="${{ inputs.repo_ig }}/translations/en/po" |
| shell: bash | ||
| run: | | ||
| SRC="${{ inputs.repo_ig }}/translations/en/po" | ||
| DEST="${{ inputs.repo_ig }}/input/translations/en" |
| ALBERT_API_KEY: ${{ inputs.albert_api_key }} | ||
| run: | | ||
| FORCE_FLAG="" | ||
| if [ "${{ inputs.translate }}" = "force" ]; then |
| FORCE_FLAG="--force" | ||
| fi | ||
| python ${{ github.action_path }}/tools/translate_pages.py \ | ||
| --source-dir "${{ inputs.repo_ig }}/input/pagecontent" \ |
| fi | ||
| python ${{ github.action_path }}/tools/translate_pages.py \ | ||
| --source-dir "${{ inputs.repo_ig }}/input/pagecontent" \ | ||
| --target-dir "${{ inputs.repo_ig }}/input/translations/en/pagecontent" \ |
| if: ${{ inputs.translate == 'true' || inputs.translate == 'force' }} | ||
| shell: bash | ||
| run: | | ||
| cd ${{ inputs.repo_ig }} |
…ERT_WORKFLOW_KEY La clé API Albert n'est plus un paramètre explicite de l'action. L'action lit directement la variable d'environnement ALBERT_WORKFLOW_KEY, gérée au niveau de l'organisation ansforge. Les IGs appelants n'ont pas à connaître ni à configurer cette clé. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Description des changements
translatedansaction.yml:false(défaut) /true(nouvelles pages uniquement) /force(tout retraduire)albert_api_keydansaction.yml: à renseigner avec le secretALBERT_WORKFLOW_KEYdepuis le workflow appelantaction.yml, placés avant le lancement de l'IG Publisher (après sushi) pour que les pages soient disponibles lors de la génération HTML :httpx.po(translations/en/po/→input/translations/en/).mddeinput/pagecontent/versinput/translations/en/pagecontent/tools/translate_pages.py(appelé via${{ github.action_path }}/tools/translate_pages.py)Utilisation