Project

General

Profile

Actions

Defect #6725

open

Acronyms don't work for Russian language

Added by Александр Шестаков over 13 years ago. Updated over 6 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Text formatting
Target version:
Start date:
2010-10-22
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

For example:

Россия(Russsia in Russian)

don't works :(


Related issues

Has duplicate Redmine - Defect #9665: Wiki format: acronyms in Cyrillic do not work, see exampleClosed2011-11-25

Actions
Has duplicate Redmine - Defect #14765: Acronyms do not work for RussianClosed

Actions
Blocked by Redmine - Feature #4050: Ruby 1.9 supportClosed2009-10-18

Actions
Actions #1

Updated by Holger Just over 13 years ago

  • Assignee deleted (Holger Just)

Please don't assign issue to people without them telling you to do so.

Also, please state what you exactly you mean with "don't works".

Actions #2

Updated by Jean-Baptiste Barth over 13 years ago

Acronyms only work with one capital letter followed by some capital letters or numbers. By letter, we mean A to Z... So Blah(de fi ni tion) will produce Blah(de fi ni tion).

In your example, are "Россия" all capital letters in russian alphabet ?

Actions #3

Updated by Александр Шестаков over 13 years ago

Yes, for example:

en: RUSSIA
ru: РОССИЯ(Страна)

Actions #4

Updated by Jean-Baptiste Barth over 13 years ago

  • Assignee set to Jean-Baptiste Barth
  • Target version set to Unplanned backlogs

OK. It won't be easy to implement until we fully support Ruby 1.9, which comes with the right libraries to handle non-ASCII characters.

For the record, everything happens line 459 of lib/redcloth3.rb (maybe we'll be on RedCloth4 when we support Ruby 1.9...). Regex with Unicode selectors like "РОССИЯ".match(/^\p{Lu}+$/) should work on Ruby 1.9+ (PCRE lib is too old on Ruby 1.8.x)

Actions #5

Updated by killout killout about 13 years ago

Hello. This is my version of solving problem.

1. Add trigger to wiki_pages table:

-- Trigger: alex_wiki_pages_tolower on wiki_pages

-- DROP TRIGGER alex_wiki_pages_tolower ON wiki_pages;

CREATE TRIGGER alex_wiki_pages_tolower
  AFTER INSERT OR UPDATE
  ON wiki_pages
  FOR EACH ROW
  EXECUTE PROCEDURE alex_wiki_pages_tolower();

2.add trigger function to redmine postgresql database:

-- Function: alex_wiki_pages_tolower()

-- DROP FUNCTION alex_wiki_pages_tolower();

CREATE OR REPLACE FUNCTION alex_wiki_pages_tolower()
  RETURNS trigger AS
$BODY$
BEGIN
NEW.title=lower(NEW.title);
return NEW;
END;
$BODY$
  LANGUAGE plpgsql VOLATILE
  COST 100;
ALTER FUNCTION alex_wiki_pages_tolower() OWNER TO postgres;

So new pages will created in small leters, even if you taped in capital letters.

Actions #6

Updated by Jean-Baptiste Barth almost 12 years ago

  • Assignee deleted (Jean-Baptiste Barth)
Actions #7

Updated by Ivan Cenov over 6 years ago

Not resolved in Redmine 2.6.10.stable
Will it be resolved in nowadays versions?

Actions #8

Updated by Mischa The Evil over 6 years ago

  • Has duplicate Defect #14765: Acronyms do not work for Russian added
Actions #9

Updated by Mischa The Evil over 6 years ago

  • Subject changed from Acronyms don't works for russian language to Acronyms don't work for Russian language
  • Category changed from Wiki to Text formatting
Actions

Also available in: Atom PDF