Changing systems welcome message

I’m having trouble editing the systems welcome message. When I click edit, it jumps to an empty text box. I’ve signed in as admin, but can’t still can’t seem to edit the text. What am I doing wrong? thanks.

6 Likes

Can we repro this Monday @tshenry?

2 Likes

There is definitely some very odd behavior going on:

This is my current experience on Try:

  1. Select text customization
  2. Edit and save customization
  3. Return to search results
  4. Select customization again
  5. Customization shows as empty
  6. Select the revert button
  7. Reverts, but only shows a single line of text and the text area cannot be expanded
  8. Return to search results
  9. Default text customization is now showing
  10. Select text customization
  11. Default text customization is back in place

Likely related: There was a problem editing text with %

1 Like

A similar not-editable issue and jumps to blank boxes exists with these two welcome notes:

2 Likes

@tshenry @codinghorror May be there is one more issue with editing texts, at least in Ukrainian language version. When I click Save Changes in some (not all) texts with ‘{{count}}’ , the system writes message "The following interpolation key(s) are invalid: “count”, and don’t save changes.

Please, watch video:

2 Likes

I can reproduce this on the Ukrainian translation as well. That particular translation doesn’t exist in the standard English translations.

2 Likes

Thanks for your reply! Please advise what should we do in this particular case?

Please clarify the following: it`s not possible to translate and save the fields with a counter variable that are for “few” values. Fields for the values ​​of “one” and “other” are saved normally.

For example it`s not possible to translate and save the field “js.filters.new.title_with_count.few”

1 Like

We will need to fix the bug. There’s nothing you can do at the moment.

This appears to be the case. For example, js.character_count.few also fails and displays the error (at least in the Ukrainian translation).

So there are currently two bugs in this topic:

  1. Translations are not saving/updating correctly (see here and here)

  2. Translations with “few” in the name are displaying an error about invalid interpolation key(s) with certain languages

4 Likes

I created a PR to fix the editing of translations, and reverting them.

I will look further into invalid interpolation key issue.

4 Likes

I am not seeing what the best solution for invalid interpolation key(s) is.

There are tests that ensure that only one and other keys are present in the yml for pluralization. The above problem is solved by adding the few key to the pluralization yml (which breaks said tests).

So, should we:

  1. Change the pluralization tests to allow more keys in the yml (few for example)
    or
  2. Change how I18nInterpolationKeysFinder functions, to allow variables (%{count} in this case) for TranslationOverrides when the pluralization is something different from one or other?
3 Likes

The problem is this piece of code:

It fails to find the original text because a pluralized key ending with .few doesn’t exist in English. The solution is to check if the key is part of a pluralized string. If translation_key ends with a plural key not supported by English (/(.*)\.(zero|two|few|many)$/) then replace that key with other and use it to look up the original English text.

3 Likes