Make WordPress Core

Opened 11 years ago

Closed 4 years ago

#35792 closed defect (bug) (wontfix)

tags cannot be added to post when using armenian language interface

Reported by: noch Owned by: azaozz
Priority: normal Milestone:
Component: Administration Version: 3.4
Severity: normal Keywords: needs-patch
Cc: Focuses: ui, javascript

Description

when wordpress interface language is Armenian, tags cannot be added to posts.

after switching interface language to English, tags can be added.

version 4.4.2, downloaded and installed yesterday.

Change History (2)

#1 @afercia
11 years ago

  • Component Editor → Administration
  • Focuses ui javascript added
  • Keywords needs-patch added
  • Owner set to azaozz
  • Status new → assigned
  • Version trunk → 3.4

Hello @noch and welcome to Trac. That's interesting. The Armenian translation translates the tag delimiter with a dot '.' so the following in tagBox.clean()

tags = tags.replace(new RegExp(comma, 'g'), ',');

becomes:

tags = tags.replace(new RegExp( '.', 'g'), ',');

which means "replace any character, globally (i.e. all matches) with a comma" and the final result is an empty string because all commas get removed in following replacements. So, comma passed to the regex should probably be escaped when it's a special character. To be honest, I don't understand the second check for if ( ',' !== comma ) which re-adds back the original delimiter, so I'd appreciate someone with more historical knowledge than me to have a look at this :) See [19853]. cc @azaozz

#2 @desrosj
4 years ago

  • Resolution → wontfix
  • Status assigned → closed

A lot has changed since this ticket was created. Mainly, the block editor is now the default editing experience with the Classic Editor being preserved through a plugin as a courtesy to help with the transition.

I've done some brief testing, and it appears that this is no longer a problem in the block editor when a site is running with Armenian translations.

Because of this, I'm going to close the ticket.

If someone feels strongly enough about fixing this and care to offer a patch, the ticket can be reopened. I think it's fair to consider it, but it's likely a risky change.

Note: See TracTickets for help on using tickets.