Author Topic: Cyrillic text convert (line order of replacing)  (Read 7961 times)

zvykov

  • Newbie
  • *
  • Posts: 22
Cyrillic text convert (line order of replacing)
« on: December 26, 2021, 12:38:50 am »
Hi, I really like the possibilities and flexibility of the MAGIC RDS 4 application. A question arose: I have songs with Cyrillic symbols, how to transliterate them correctly.
I was just compiling a list of letters in the TEXT REPLACING window, but the combinations "тся" and "ться" are translated character by character and it doesn’t work as it should be.
Maybe there are thoughts on how to do this correctly?
Attached, just in case, a variant of what I need.
Thanks in advance.

Jan

  • Hero Member
  • *****
  • Posts: 1139
Re: Cyrillic text convert
« Reply #1 on: December 26, 2021, 08:51:14 am »
The text replacing supports replacement of text fragments created by previous replacement. In other words, the text processing is made line per line.

To avoid this, you have several options:

1) Use the word %END% where you want to avoid further replacement in case of match
2) Use intermediate expression for temporary storage
3) Change the line order where it is possible (select the cell, right click - Move Up/Down)

See the examples:

zvykov

  • Newbie
  • *
  • Posts: 22
Re: Cyrillic text convert (line order of replacing)
« Reply #2 on: December 26, 2021, 12:44:23 pm »
It's so simple and so amazing. I used the third method "тся" and "ться" put at the beginning of the list and now it works as it should.
Thank you very much, JAN.

zvykov

  • Newbie
  • *
  • Posts: 22
Re: Cyrillic text convert (line order of replacing)
« Reply #3 on: August 04, 2023, 06:01:28 pm »
Hi Jan!
Is it possible to set up text replacement rules so that the letter "ю" is replaced by "yu" and in the cases below it would be like this:
Юля - Yulya
юля - yulya
ЮЛЯ - YULYA
So far, only the first two options have been implemented:
%С%ю - yu
Ю - Yu
Is it possible?

Jan

  • Hero Member
  • *****
  • Posts: 1139
Re: Cyrillic text convert (line order of replacing)
« Reply #4 on: August 04, 2023, 09:30:47 pm »
The resolution would be to replace whole words before replacing letters. The replacement is processed line per line, from the top line to the bottom.

zvykov

  • Newbie
  • *
  • Posts: 22
Re: Cyrillic text convert (line order of replacing)
« Reply #5 on: August 04, 2023, 09:39:26 pm »
I used these specific words as an example of a situation to understand what I meant. And I just like to work by the rules. Composing all possible words with such a combination will not be easy and long.

Jan

  • Hero Member
  • *****
  • Posts: 1139
Re: Cyrillic text convert (line order of replacing)
« Reply #6 on: August 04, 2023, 09:56:27 pm »
Now I understand. You want to specify each word only once, match all combinations of upper and lower case and keep that in the resulting word. It can be done by the JavaScript. But the idea is interesting and I'll consider a special prefix for making such replacement.

zvykov

  • Newbie
  • *
  • Posts: 22
Re: Cyrillic text convert (line order of replacing)
« Reply #7 on: August 04, 2023, 10:21:35 pm »
Yes, that's what I meant.
The idea with the prefix is ​​cool, it would be convenient.
Concerning a script, it is possible a suitable example?

zvykov

  • Newbie
  • *
  • Posts: 22
Re: Cyrillic text convert (line order of replacing)
« Reply #8 on: September 06, 2023, 09:34:09 am »
Hi Jan!
Tested a new version 4.1.3 with support 'KeepCase'.
There is a nuance: if the word has the same character, then the second time is processed erroneously. For example ляля to lyayaя if "я" to %keepcase%ya
Or am I setting something wrong...

Jan

  • Hero Member
  • *****
  • Posts: 1139
Re: Cyrillic text convert (line order of replacing)
« Reply #9 on: September 07, 2023, 11:23:55 pm »
I believe this has been fixed in current build.

zvykov

  • Newbie
  • *
  • Posts: 22
Re: Cyrillic text convert (line order of replacing)
« Reply #10 on: September 08, 2023, 09:58:24 am »
It would be cool. Let me know about the fix. Thanks.