Arad 🇷🇴
Account created on 13 April 2006, over 19 years ago
#

Merge Requests

More

Recent comments

🇷🇴Romania claudiu.cristea Arad 🇷🇴

They need to preserve their plural variant delte.

E.g., if the English string to be translated is:

[
  0 => '1 apple',
  1 => '@count apples',
]

Let's take Polish, which has 3 plural variants. It will go as:

[
  0 => '1 jabłko',
  1 => '@count jabłka',
  2 => '@count jabłek'
]

If we delete the singular (index 0) the result should be:

[
  0 => '',
  1 => '@count jabłka',
  2 => '@count jabłek'
]

But if we delete instead the 1st plural form:

[
  0 => '1 jabłko',
  1 => '',
  2 => '@count jabłek'
]

... or the 2nd plural form

[
  0 => '1 jabłko',
  1 => '@count jabłka',
  2 => ''
]

This should be fixed in the form but also on Excel import, if case.

🇷🇴Romania claudiu.cristea Arad 🇷🇴

We need this together with Check the status of a consumer Active . The code looks good, remarks were addressed.

🇷🇴Romania claudiu.cristea Arad 🇷🇴

I think this was already fixed along with other issue. Let's keep it around for a while...

🇷🇴Romania claudiu.cristea Arad 🇷🇴

Cannot reproduce. I'm going to close this issue. If you feel I'm wrong please reopen.

🇷🇴Romania claudiu.cristea Arad 🇷🇴

I think is is fixed already in 1.x

Keeping around for a while to get more info

🇷🇴Romania claudiu.cristea Arad 🇷🇴

I'm wondering if this shouldn't be a core issue rather than Babel. There's nothing we can do this in the module until there's no way to hook into the Locale module process.

Am I missing something?

🇷🇴Romania claudiu.cristea Arad 🇷🇴

I think I disagree with the scope. Right now Source is defining a source string, not a source instance. It exposes all attributes of a source:

  • Source string
  • Translation context
  • Status
  • Hash

It doesn't expose any of the source instance specific values, such as plugin and ID.

Keeping this around for a while to get more info.

🇷🇴Romania claudiu.cristea Arad 🇷🇴

Applied QA remarks

🇷🇴Romania claudiu.cristea Arad 🇷🇴

Thanks you. Fixed the remarks

🇷🇴Romania claudiu.cristea Arad 🇷🇴

I expect that this will be done in a more generic way, for example, by setting the installation configuration defined, by hook or event subscriber defined in 3539510

Problem is that we need this exclusion now. I've added a TODO (see MR) and improved the Exclude config source strings by schema Active description by adding this additional line:

Consider to implement the @todo from BabelConfigHelper::excludeWebformConfigurations().

🇷🇴Romania claudiu.cristea Arad 🇷🇴

This is fixing the error in our project. I think it would be overkill to add a test. Ready to be reviewed

🇷🇴Romania claudiu.cristea Arad 🇷🇴

Ready for review

🇷🇴Romania claudiu.cristea Arad 🇷🇴

claudiu.cristea created an issue.

🇷🇴Romania claudiu.cristea Arad 🇷🇴

claudiu.cristea created an issue.

🇷🇴Romania claudiu.cristea Arad 🇷🇴

Ready for review.

🇷🇴Romania claudiu.cristea Arad 🇷🇴

Thank you for reporting but it's not the case anymore as this was implemented differently in other issues

🇷🇴Romania claudiu.cristea Arad 🇷🇴

The blocker has been merged, this is ready for review.

🇷🇴Romania claudiu.cristea Arad 🇷🇴

The work is done but this was built on top of Allow different default status configurable per-plugin Active . Postponing until Allow different default status configurable per-plugin Active is in. Still keeping in my name.

🇷🇴Romania claudiu.cristea Arad 🇷🇴

See also how this implemented in the Field group module for JS tabs

🇷🇴Romania claudiu.cristea Arad 🇷🇴

I have moved the work in the issue where it belongs Allow different default status configurable per-plugin Active . Closing this...

🇷🇴Romania claudiu.cristea Arad 🇷🇴

Merged. Thank you all.

🇷🇴Romania claudiu.cristea Arad 🇷🇴

Thank you for feedback on my changes

🇷🇴Romania claudiu.cristea Arad 🇷🇴

I've applied myself few minor changes and created three follow-ups:

From my point of view this is RTBC

🇷🇴Romania claudiu.cristea Arad 🇷🇴

I don't have drupal/core-dev as dependency. That dependency is specifically designated to test Drupal core.

🇷🇴Romania claudiu.cristea Arad 🇷🇴

Adding credits to @alorenc for spotting the problem

🇷🇴Romania claudiu.cristea Arad 🇷🇴

Ready for review

🇷🇴Romania claudiu.cristea Arad 🇷🇴

Also, some credits, I think should be added in 🐛 Config of the type plural_label can never be valid due to the label constraint Active for the devs doing the initial code here, code that was the same as in 🐛 Config of the type plural_label can never be valid due to the label constraint Active (@wim leers, @smustgrave and me)

🇷🇴Romania claudiu.cristea Arad 🇷🇴

Move status from StringTranslation into Source

🇷🇴Romania claudiu.cristea Arad 🇷🇴

Reverted to clarify more the solution

🇷🇴Romania claudiu.cristea Arad 🇷🇴

I've merged this but I had a 2nd thought and, I think, this needs more architectural analysis

Now, I'm not sure anymore that we should offer per-instance status granularity. That would introduce some problems:

  • If user makes no opinion (
    bs.status === NULL)</code > what is the status of a source when its instances have different statuses? You could argue that if at least one is TRUE, then it's TRUE. But wouldn't that be a too complex solution?</li>
      <li>I think there should be no per-instance status, but only <em>per-plugin status</em> to get the things simpler:<ul>
      <li>Plugins might set the per-status in the plugin definition (attribute).</li>
      <li>The <code>bs.status

    column defaults to 0

  • When a new source is added, if the hash exists AND is 1 we do nothing (1 always wins over 0). Otherwise we set bs.status to the plugin definition status.
  • Third-party are able to implement hook_babel_translation_type_info() to change the plugin-based initial status.
🇷🇴Romania claudiu.cristea Arad 🇷🇴

Ready for review but should be reviewed ONLY AFTER 🐛 Track Usage module creates too many database queries Active .

🇷🇴Romania claudiu.cristea Arad 🇷🇴

Fix title & credits

Production build 0.71.5 2024