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

Show only the "Other locales" feedback from relevant languages #190

Open
amieiro opened this issue Sep 5, 2023 · 0 comments
Open

Show only the "Other locales" feedback from relevant languages #190

amieiro opened this issue Sep 5, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@amieiro
Copy link
Member

amieiro commented Sep 5, 2023

What problem does this address?

Following what we did in Improving Translation Suggestions from Other Languages, there is another improvement: only show the relevant languages for the current locale, removing the other ones from the list.

Proposed by @fxbenard here.

What is your proposed solution?

Add a new array:

public array $relevant_locales = array(
        'gl' => array( 'es', 'pt', 'pt-ao', 'pt-br', 'ca', 'it', 'fr', 'ro' ),
        'es' => array( 'es-ve', 'gl', 'ca', 'pt', 'pt-ao', 'pt-br', 'it', 'fr', 'ro' ),
    );

If the language is in this array, it will be in the "Other locales" feedback. If we don't have any key for the current language, it will return all the languages in the "Other locales" feedback.

This will remove the variants if they are not in the array: e.g., for the Galician language, it won't show the Spanish variants and for the Spanish (Spain), it will only show the Spanish (Venezuela) variant.

@amieiro amieiro added the enhancement New feature or request label Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant