Something is definitely not okay on this page. Strings with plural form should have 2 separate text input fields (see HU on the right side), but TR has only one single input field on the left side, which is strange:
Screenshot comparison

Checking some other strings with similar plural forms shows me that this issue is not related to this given string ID, but it's much more general instead.

Comparing the plural form configurations of TR and HU locales by exporting a sample .po file:

  • TR: nplurals=1; plural=0;
  • HU: nplurals=2; plural=(n!=1);

The "nplurals=1;" seems responsible why only one textbox is displayed instead of the expected two. By searching for the official plural form definition for Turkish I found these 2 resources:

  1. Translate House says: nplurals=2; plural=(n > 1);
  2. Gnu.org says: nplurals=2; plural=n>1;

Which both seems for me quite the same. Then an administrator could check and update on l.d.o what is set up currently for your locale.

Original issue description

I'm trying to translate the text The installer requires that you create a translations directory as part of the installation process. Create the directory %translations_directory . More details about installing Drupal are available in <a href=":install_txt">INSTALL.txt</a>.. However, I'm getting Missing variable(s): @translations_directory when I click Save Changes. It's like that with any placeholder.

Comments

Kartagis created an issue. See original summary.

kartagis’s picture

Issue summary: View changes
kartagis’s picture

Issue summary: View changes
kartagis’s picture

Anything?

vijaycs85’s picture

Status: Active » Postponed (maintainer needs more info)

@Kartagis: What was your translation string?
1) Make sure it has the placeholder in it.
2) Do not translate placeholder.

e.g. if the original string is Create the directory %translations_directory then your translation string should be Créer le répertoire %translations_directory in french. The position of the placeholder can change.

kartagis’s picture

My translation string was Create the directory %translations_directory . More details about installing Drupal are available in <a href=":install_txt">INSTALL.txt</a>. I'm not trying to translate the placeholder.

baluertl’s picture

I succeed to submit multiple variants for this #2412497 string here in the original English language. So I assume it's probably not a validation error.

@Kartagis have you tried to submit only the two placeholders alone?

%translations_directory
:install_txt

If that is accepted, than it's probably some formatting mistake I think.

kartagis’s picture

I tried to translate @count seconds as @count saniye and I still got the error. Then I omitted saniye, leaving behind @count, got the error.

kartagis’s picture

Majority of the issues were my fault and I was making a typo. As for @count, I found out it was indeed an issue. I stumbled across https://www.drupal.org/project/drupal/issues/2833830. Thank you anyway vijayc85 and Balu Ertl.

kartagis’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)
baluertl’s picture

Title: Missing variable » Misconfigured plural forms for Turkish locale
Component: Miscellaneous » Existing language complaint
Issue summary: View changes
Status: Closed (works as designed) » Active

As @Kartagis reported multiple times (see child issues #3090159: Missing variable @count and #3093548: Missing variable(s): @backends, @handbook_url) I felt the need to move this investigation forward. This issue has the lowest NID among the three of them, so I consider this one the original, and the other two the duplicates.

baluertl’s picture

Issue summary: View changes

This situation is not from the beginning: some string IDs with plural form definition has been successfully translated already since 2009.

gábor hojtsy’s picture

People with access to approve suggestions should be able to import .po files to fix this AFAIK. Did you try that?

kartagis’s picture

No but we shouldn't have to resort to importing .po files every time we come across this.

gábor hojtsy’s picture

You would only come across this problem if someone imported a broken/incorrect translation file AND that person has high privileges. The combination of those two is not assumed to be commonplace.

kartagis’s picture

So, what can we do about this? This is a HUGE problem. We are unable to translate any page if @count exists on it.

tigin öztürk’s picture

Let's discuss this at the Drupal Turkey meeting @Kartagis. People have high privileges should pay attention if such problems occur after the importing process.
IDK "the official plural form definition for Turkish" mention in the problem described above but we can try @Gabor's suggestion first.

kartagis’s picture

@Balu Ertl I'm sorry I missed the question you asked. No I am not able to verify.

baluertl’s picture

"So, what can we do about this? […]"

@Kartagis Afaik recently you gained administrator permissions on the Turkish locale, right? If yes, then here's a list of steps elaborating the process Gábor mentioned in his comment #13. By following them you can try to re-configure the proper plural definition for Turkish locale:

  1. Go to the Export tab of your localization group
  2. Download the exported file, open it in a plain-text editor and search for the line saying "Plural-Forms: nplurals=1; plural=0;\n"
  3. Replace the current definition to one of the options I wrote in the issue description (IS). So your entire line now looks like this: "Plural-Forms: nplurals=2; plural=n>1". Save the file.
  4. Go to Import tab of your locale and import the file.
  5. At the end visit back the original string ID #77350 and let's see whether this process helped.
baluertl’s picture

Issue summary: View changes
kartagis’s picture

Unfortunately, that didn't work. Maybe some cache needs to be cleared? Because when I exported again after I imported, it was reverted to the original.

gábor hojtsy’s picture

Status: Active » Postponed (maintainer needs more info)

Because when I exported again after I imported, it was reverted to the original.

Let's unpack this. The act of exporting broke the plural form? It was good on the UI after you imported the .po file but broke once you exported something?

kartagis’s picture

Status: Postponed (maintainer needs more info) » Active

I first exported the .po, changed the relevant line to first nplurals=1; plural=(n>1); imported, tried the @count thing, didn't work. Then I tried nplurals=2; plural=n>1; and imported again. I tried to translate @count, no go. Then I exported the .po again and the line was like I never changed it.

gábor hojtsy’s picture

Status: Active » Postponed (maintainer needs more info)

I am sitting with Burak Ozdemir and Thomas Bailly and FMB and they are all saying again that 2 strings should be it. #2503057: Turkish had wrong default plural setup also proves with sources that the single plural formula setup was not correct. I changed it on the backend for now to

nplurals=2; plural=(n > 1);

. We should also fix #2503057: Turkish had wrong default plural setup separately AND watch if there will be any regressions on localize.drupal.org of this config.

Postponing for more info assuming. we can/should revisit this to see if the new config sticked or we need to fix something else so its not undone accidentally.

kburakozdemir’s picture

Issue summary: View changes
StatusFileSize
new107.78 KB

Regarding Gabor's answer (#24)

We now have separate strings for singular and plural forms... and we can now save the translation, which was not the case before.

@Tolga I think that this issue needs feedback/more info.

kartagis’s picture

I'll check this tonight @kburakozdemir, thanks

makbay’s picture

I can confirm that we have 2 separate fields for singular and plural translations and it works!

translations

baluertl’s picture

Status: Postponed (maintainer needs more info) » Needs review
kburakozdemir’s picture

I can also confirm that the translation for singular/plural situations is now working. Thanks.

kburakozdemir’s picture

Status: Needs review » Reviewed & tested by the community

There are other people that have tested this.

kartagis’s picture

I can also confirm. Thank you to those who have put serious effort in this.

tigin öztürk’s picture

I also confirm.

kartagis’s picture

I just noticed something. I didn't get any errors like I used to, but when I proceeded to translate https://localize.drupal.org/translate/languages/tr/translate?sid=12830 and hit Save changes, it stays on the screen like nothing has been done. Sure, I get the status message that translation was added, but it's like no translation has been added.

gábor hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

@Kartagis: that seems to be a different bug? I think this is sufficienctly resolved.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.