Apps-android-commons: Description field uses outdated code iw for Hebrew

Created on 15 Apr 2019  路  14Comments  路  Source: commons-app/apps-android-commons

Summary:

When uploading a file, in the file name and description form the Hebrew language is identified by the code "iw".

This is a deprecated code. The current ISO 639-1 code is "he". Despite being deprecated, the code "iw" is often used internally in Google products and Java libraries, but it must never be shown to users. It must always be aliased internally to "he". End users must only see the code "he". It would be even better to show the name of the language: "注讘专讬转" or perhaps "Hebrew".

While you are at it, you should also check how Indonesian and Yiddish are displayed. They also have deprecated codes: "in" and "ji". The current codes are "id" and "yi".

Screenshot_20190415-142704_Commons

assigned enhancement good first issue

Most helpful comment

Hello everyone!

I also detected this issue and wanted to join to conversation.

For the point 1.

My understanding is that internally the code uses "iw" for the Hebrew language, and makes sense because it's based in the OS. We can just detect that "iw" in the dropdown and replace it with "he".

Since it's just a replacement in the UI, but internally stills uses "iw", the rest of the code shouldn't fail.

For the point 2

As a final user, I think the best for usability is to see the full name while the dropdown is open (making it easier to identify and select the desired language) and, once selected, just see the code (in this case "he")

I hope this helps with the discussion 馃槃

All 14 comments

Thanks for the tip!

Are we currently using ISO codes? Should we move to ISO 3?

Internally, you should definitely use the same codes that are used on Commons.

You should use "iw", "in", and "ji", only when it is required by Android software libraries. On this screen you _probably_ don't need to use them at all, but I don't know enough about Android to be certain.

To users you should ideally show the language name and not the language code.

Hello, I'm looking to make my first contribution in an Open Source project. Can I take this issue?

@CAVillalobos Yes sure, it is yours! Please let us know about your progress every few days or so, thanks :-)

Hello and sorry for the delay. I've reading the code looking where the language list is obtained and I found this line. I was not sure, but after consulting it it seems that the app gets the codes from all the languages currently installed, which means that Java or Android themselves are managing the codes wrong.
So, I think the only thing I can do is just hide the codes from the user as @amire80 stated before, but I don't think it's a good idea to try to change the actual codes.
So now I'm going to start working on that.

Hello again. I've modified the language spinner's TextView to only show each language by name completely hiding the codes to the user. Is this what you asked for?
image

The only problem I'm seeing now is that the spinner's size has increased more than it should have.
image

This doesn't seem too bad since the size keeps almost the same for most languages, but there are a few that may occupy more space that they should:
image

I think we can go with one of these options:

  • Go back and set the TextView to show the codes again hardcoding the ones that are wrong.
  • Impose a character limit and replace those who exceed this limit with something else (similar to ellipsis in css)
  • Show the spinner and the description text-area in different lines

Hi @CAVillalobos , firstly congratz for your first time contribution:) I think what we wanted for this issue is mapping deprecated language codes with new ones, and using new ones instead. I think using the whole language name is not efficient in terms of space.

I don't have much knowledge about this formats but, found such thing: https://gist.github.com/SeanZoR/9152167 and seems like can be beneficial for us too. What do you say?

A couple of things:

  1. Whatever you show on the screen, make sure that you send a valid code when you save the template. Commons templates use "he", not "iw".
  2. Being efficient in terms of space shouldn't be the only consideration. Being convenient to the user is important, too. For people it is more natural to read a name and not a code of two or three letters. "Standard Moroccan Tamazight" is an outlier. Most languages have a much shorter name.

Thanks @amire80

  1. Whatever you show on the screen, make sure that you send a valid code when you save the template. Commons templates use "he", not "iw".

So we need to map deprecated version to up to date version in any case.

  1. Being efficient in terms of space shouldn't be the only consideration. Being convenient to the user is important, too. For people it is more natural to read a name and not a code of two or three letters. "Standard Moroccan Tamazight" is an outlier. Most languages have a much shorter name.

I think displaying whole language name and the up to date language code between parentheses on language selection list, and displaying only the language code after selection would be enough for convenience. Since the user already saw the code next to the language during selection, they will know what it means.

But I would like to hear from others too.

Hello everyone!

I also detected this issue and wanted to join to conversation.

For the point 1.

My understanding is that internally the code uses "iw" for the Hebrew language, and makes sense because it's based in the OS. We can just detect that "iw" in the dropdown and replace it with "he".

Since it's just a replacement in the UI, but internally stills uses "iw", the rest of the code shouldn't fail.

For the point 2

As a final user, I think the best for usability is to see the full name while the dropdown is open (making it easier to identify and select the desired language) and, once selected, just see the code (in this case "he")

I hope this helps with the discussion 馃槃

Hello again. Looking at your comments I decided to go for what I previously suggested as the first option to solve the problem so I changed the codes in the UI to show the correct codes while keeping the deprecated ones in the background basing in the gist that @neslihanturan shared before.
image

EDIT: Apparently my phone was rendering the language names in lowercase but now it's displaying them always capitalized so I'm removing the last part of this comment.

Hi @CAVillalobos seems like we defined our scope after the discussion. Sorry but I couldn't understand your edit, since I didn't see the previous comment before the edit.

I mean this:

EDIT: Apparently my phone was rendering the language names in lowercase but now it's displaying them always capitalized so I'm removing the last part of this comment.

Oh, sorry if I wasn't clear. You see, the first times I compiled the app the list with all the available languages was displayed only in lowercase and I thought this didn't looked good so I changed the display to show the names capitalized with something like:
String languageName = languageNamesList.get(position).substring(0,1).toUpperCase() + languageNamesList.get(position).substring(1);
So I made the mention but after checking again the names were being properly displayed so I deleted the last part of the comment and replaced it with that edit.

Actually I just found out while writing this the reason for my confusion. I happens that if you have your phone's language settled to other one (in my case, Spanish) the names are displayed in lower case.
image
I got confused since I was changing my phone's language to English in order to take the screenshots.

Was this page helpful?
0 / 5 - 0 ratings