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

IBX-9444: Fixed locale ach-UG #91

Merged
merged 3 commits into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ parameters:
path: src/bundle/Controller/PasswordResetController.php

-
message: "#^Call to an undefined method Symfony\\\\Component\\\\Form\\\\FormInterface\\:\\:getClickedButton\\(\\)\\.$#"
message: "#^Call to an undefined method Symfony\\\\Component\\\\Form\\\\FormInterface\\<mixed\\>\\:\\:getClickedButton\\(\\)\\.$#"
count: 4
path: src/bundle/Controller/UserRegisterController.php

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class AvailableLocaleChoiceLoader implements ChoiceLoaderInterface
{
// Acholi dialect is used by In-Context translation
// and should not be present on the list of available translations.
private const EXCLUDED_TRANSLATIONS = ['ach'];
private const EXCLUDED_TRANSLATIONS = ['ach-UG'];
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure how Crowdin does things here, but just to be sure, I would leave both values if that solves the issue.
@mikadamczyk, could you sheed some light on this as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @ViniTou ,
from what I see:

There are several alternative options:

  • Add mapping ach-UG -> ach to TranslationCollectorPass. Then there is no need at all to change anything in ibexa/user bundle
  • Or ('better safe then sorry' approach) : add both strings to EXCLUDED_TRANSLATIONS :
  private const EXCLUDED_TRANSLATIONS = ['ach', 'ach-UG'];

Copy link
Contributor

Choose a reason for hiding this comment

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

@reithor you are right, currently we have ach-UG as a locale and it should be

private const EXCLUDED_TRANSLATIONS = ['ach-UG']

The 'ach' version is only valid when someone adds it as a user_preferences.additional_translations which I bet will never happen


/** @var \Symfony\Component\Validator\Validator\ValidatorInterface */
private $validator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function providerForGetChoiceList(): array
],
],
'acholi_exlusion' => [
['en', 'ach'],
['en', 'ach-UG'],
[],
[
'English' => 'en',
Expand Down
Loading