Skip to content

[Translation] [Loco] Ability to configure value of status query-variable #58072

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

Merged
merged 1 commit into from
Sep 1, 2024

Conversation

mathielen
Copy link
Contributor

Added ability to configure value of status query-variable when fetching translations from loco API.

Q A
Branch? 7.2
Bug fix? no
New feature? yes
Deprecations? no
Issues
License MIT

With loco it is possible to flag your translations as provisional, meaning that they might not be approved by someone in charge of your project's translations. For example these provisional translations might be auto-translated.

To still be able to use these auto-translated translations in your project it must be possible to integrate them (i.e. via CLI command bin/console translation:pull loco)
Therefore, when invoking the export-API of loco a different value for the field status has to be given. Right now it is statically set to translated,blank-translation, meaning provisional translations will not get fetched.

With the DSN to the translation provider, we can already provide options to the translation provider implementation with query-parameters like this:
loco://API_KEY@default?status=translated,provisional

I have used this functionality for setting the desired value. By default (if omitted) the current value translated,blank-translation will be used.

@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has a contribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (see https://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (see https://symfony.com/releases)
  • Features and deprecations must be submitted against the 7.2 branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@mathielen mathielen changed the title Ability to configure value of status query-variable [Translation] [Loco] Ability to configure value of status query-variable Aug 23, 2024
@carsonbot carsonbot changed the title [Translation] [Loco] Ability to configure value of status query-variable [Loco] Ability to configure value of status query-variable Aug 23, 2024
@carsonbot carsonbot changed the title [Loco] Ability to configure value of status query-variable [Translation] [Loco] Ability to configure value of status query-variable Aug 23, 2024
@fabpot
Copy link
Member

fabpot commented Sep 1, 2024

Thank you @mathielen.

@fabpot fabpot merged commit cc11de0 into symfony:7.2 Sep 1, 2024
4 of 7 checks passed
nicolas-grekas added a commit that referenced this pull request Sep 11, 2024
…rYamous)

This PR was merged into the 7.2 branch.

Discussion
----------

[Translation] [Loco] Document `status` query variable

| Q             | A
| ------------- | ---
| Branch?       | 7.2
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Issues        | [Doc issue](symfony/symfony-docs#20184) - Related to #58072
| License       | MIT

Update readme for Loco bridge documentation

Commits
-------

0a91018 add documentation for Loco query parameter
@fabpot fabpot mentioned this pull request Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants