Translating numbers in Arabic

The AnkiDroid crowdin site uses special characters like the%d in %d note shown. As I understand it, these characters would be replaced with the appropriate values (1 in the above example).

Now, for the “Form: One” for example, it would always be 1 note shown. So can I use 1 note shown in the translation for this form?

2 Likes

That’s not a good idea. The system will be looking for the variable in that string, so it needs to remain a variable exactly as it is. See: Translating AnkiDroid · ankidroid/Anki-Android Wiki · GitHub .

3 Likes

So how can I do something like the following?

Form: One
%d note shown    ->    بطاقة واحدة

١ بطاقة/بطاقة ١ sounds wrong to me.

Or to give an artificial example using English:

Form: One
%d note shown    ->    one note shown

instead of 1 note shown?

Let’s assume that the person trying to answer your question doesn’t know Arabic …

Are you saying you want to spell out the word instead of using the digit?

Not really. Arabic has a complex number system. The number “1” has two words based on gender, and “2” gets embedded into the noun like this:

2 = إثنان
card = بطاقة
2 cards = بطاقتان
1 Like

Often there has to be some flexibility for the purposes of localization. Have you looked at how this has been done in other similar strings already? Staying consistent with that is probably the best idea.

@abdo – I know you’ve worked on the Arabic localization quite a bit. Do you have any thoughts on this?

I’m trying to fix those strings actually!

How Arabic numbering should be handled, imo:
  • The 0 case is ridiculous, there’s never a reason to say “There are 0 (zero) cards”. You would say something like “There are no cards” instead.
  • The 1 and 2 cases look strange written in digits.
  • The other cases are fine (and almost impossible to do manually anyway).

Actually, in Arabic you would not normally use the word “one” — especially, if the noun used shows that number in its form, as does your example. Use JavaScript and if you are dealing with a 1, leave it out.

Similarly, if there are two, you do not specify the number, but use the dual form of the noun.

It can be used for emphasis, which is what I was going for with my translation. See the following examples from Al Quran:
إنما هو إله واحد
الذي خلقكم من نفس واحدة
كان الناس أمة واحدة
There are many more examples of this emphatic usage.

That’s what I’m doing, see my example.

That’s a great topic to discuss with other translators here, so you can work together on a consistent style that is compatible with localization.

1 Like

For what it’s worth, Anki had similar problems in the past where removal of things like %d would cause crashes/error messages. Fluent handles this better (omitting symbols is fine, and the different plural cases can be handled differently), but I understand why the AnkiDroid developers would be reluctant to switch to it (work required to switch, and they’d lose the built-in integration that Android Studio has).

2 Likes

I assumed that you did not want the emphasis. Sorry.

1 Like

On AnkiDroid, I just gave in and made sure to preserve variables, even if they result in unnatural translations. It’s unfortunately not uncommon for programs to have this issue in Arabic translations.

3 Likes

It’s unfortunate to have to bend the language to the circumstance, but it happens in plenty of languages. [I myself broke all sorts of things last year when I tried putting the % symbol in front of the digit-variables, since that’s where it belongs in Turkish – %95 instead of 95%.]

It sounds like the best path is following suit with how this has been “solved” – or at least addressed in some standardized way – in the larger programming/localization world.

1 Like

For Arabic translators

Following Danika_Dakika’s suggestion, I looked into some apps (plus an OS) to see how they translate numbers to Arabic. Here, I list text I found in each one of them as well as some comments:

YouTube

  • Note the and the incorrect translations for millions and 405 views.
  • Sometimes there’s an added “(2)”.
  • It uses the “English digits”.
Chrome


An unnecessary (٢).

Obsidian


Lazy approach lol. This one uses “English digits” too.

Google Play


This one is a mess!

  • It uses both styles of digits (even on the same line!).
  • It uses lazy translations
  • Incorrect translations for millions.
  • Inconsistent “+” positions.
  • Unnecessary numbers in parentheses.
Windows 10


This is even worse than Google Play! Notice the incorrect تنوين الفتح placement on “عنصراً”.

(I used images because text alignment is messed up on discourse)

Conclusion

There doesn’t seem to be any standard whatsoever!

Translation method

Since we can’t add correct translations for certain numbers, I suggest we follow Obsidian’s method.

For example, if x=س is any number then:

x card(s) shown -> تُعرضُ س بطاقة

What do you think?

3 Likes

I agree, except that we can make it a bit more correct by using the plural form (بطاقات) for the FEW case. Example:

This is the approach I’ve been following for AnkiDroid.

1 Like

But then it’s inconsistent…

Correctness is more important in my opinion.

4 Likes