oppia-android icon indicating copy to clipboard operation
oppia-android copied to clipboard

Profiles can't have internationalized names

Open BenHenning opened this issue 3 years ago • 13 comments

Describe the bug Profiles can't have internationalized names.

To Reproduce Steps to reproduce the behavior:

  1. Open the create profile flow
  2. In the name box for the profile, type non-English characters
  3. Attempt to create the profile
  4. Observe that an error appears indicating that the profile can't be created

Expected behavior Now that Oppia supports non-English languages, profile names should be able to also be internationalized.

Demonstration image

Environment

  • Device/emulator being used: Nexus 5X
  • Android or SDK version (e.g. Android 5 or SDK 21): Android 8.1.0
  • App version (you can get this through system app settings or via the admin controls menu in-app): Develop build on 04b8e0381e3d49a4a4a0f17e111386385bf4ffbb.

Additional context None

BenHenning avatar Nov 20 '21 10:11 BenHenning

@BenHenning, I want to work on this. Shall I self-assign this one?

coder2699 avatar Nov 21 '21 07:11 coder2699

@BenHenning I am open to solve this issue.

HIM7707 avatar Nov 21 '21 10:11 HIM7707

@coder2699 @HIM7707 apologies, I was taking some time off. Are either of you still available to work on this?

BenHenning avatar Dec 07 '21 20:12 BenHenning

May I work on this? @BenHenning

JishnuGoyal avatar Dec 09 '21 18:12 JishnuGoyal

Sure @JishnuGoyal. However, I think we first need guidance from @srushtirk about what we should specifically changing here.

@srushtirk for context: we currently prohibit any non-English letters in profile names. I think we need to lift that restriction, but it's not clear to me if we need to have other restrictions. Can you follow up with UX and let us know what adjustments should be made here?

BenHenning avatar Dec 14 '21 01:12 BenHenning

@BenHenning Per discussion with the UX team, we should allow/not allow the following:

Allow following characters for Profile names:

  • Apostrophes (')
  • Hyphens (-)
  • Periods (.)
  • All English and Non-English characters

Do Not Allow following characters for Profile names:

  • Numbers (0, 1, 2, ... 9)
  • Symbols (!@#$%^&*... etc.)
  • Parentheses and Brackets ( (, [, { )

Also, note that we should not allow users to mix and match Eng+Non-Eng characters.

srushtirk avatar Dec 20 '21 05:12 srushtirk

As the requirements stated by @srushtirk , I feel making a function that checks using if-else would be much easier than creating a regex pattern that processes the String. I'll create a PR to solve the issue. Could you assign me @BenHenning

JishnuGoyal avatar Dec 25 '21 20:12 JishnuGoyal

Assigning this to you @JishnuGoyal.

@srushtirk to clarify one bit: some languages do mix English & non-English characters (such as Spanish, French, German, and others). How exactly should this requirement work?

BenHenning avatar Jan 05 '22 04:01 BenHenning

Thanks for pointing it out. Two options that we can undertake:

  1. Allow languages that use English alphabets to mix and match ONLY English alphabets (plus the allowlisted characters in the comments above) along with their language specific letters. However, there are around 100 languages that use English letters.
  2. Allow mix and match of letters in all languages.

Could you please let me know the consequences of choosing one over the other option above? Specifically if we allow mixing and matching of letters in any language, what tech issues do we foresee?

srushtirk avatar Jan 07 '22 23:01 srushtirk

Thanks for pointing it out. Two options that we can undertake:

  1. Allow languages that use English alphabets to mix and match ONLY English alphabets (plus the allowlisted characters in the comments above) along with their language specific letters. However, there are around 100 languages that use English letters.
  2. Allow mix and match of letters in all languages.

Could you please let me know the consequences of choosing one over the other option above? Specifically if we allow mixing and matching of letters in any language, what tech issues do we foresee?

@srushtirk I don't foresee any issues with (2). I think we originally chose the present UX for simplicity, but given that the admin can always rename a profile if it's named poorly (such as including emojis) I don't see any issues with allowing them to be combined.

One issue I see with (1) is that we don't know what language users will use for their name, and it's quite possible multiple languages will be used for a single app installation instance.

BenHenning avatar Jan 08 '22 07:01 BenHenning

From feedback on the current Kenya research project, fixing this issue could help a lot with students being able to uniquely identify their profiles while using the app.

Bumping this to an earlier release milestone since it can have a nice positive impact with the app.

BenHenning avatar Jun 16 '22 15:06 BenHenning

Note that for Alpha MR5 this should support letters + numbers only.

For Beta it should support letters in various languages, but not numbers. @BenHenning -- I think @JishnuGoyal's PR supports this but not the Alpha MR5 requirement?

seanlip avatar Aug 09 '22 22:08 seanlip

Hi @seanlip , you are right -- confirming my PR supports all letters (english + international) while rejecting all the numbers (it also rejects all symbols except . , ', -).

JishnuGoyal avatar Aug 10 '22 10:08 JishnuGoyal

Deferring to beta since #4505 is implementing the specifically needed functionality for the user study (which will just be conditionally disabling the profile name validity check for the study).

BenHenning avatar Aug 17 '22 02:08 BenHenning

Profiles with internationalized names can be created now in beta version.

KolliAnitha avatar Sep 12 '22 02:09 KolliAnitha