Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.3. Bug] Generate aliases for pages with russian names is broken #848

Closed
Serhii-DV opened this issue May 25, 2017 · 7 comments
Closed
Assignees
Labels
Milestone

Comments

@Serhii-DV
Copy link
Contributor

Hi.

It doesn't generate at all for russian words.

For example:

  • create any page in Site structure with names like Первая страница, Вторая страница;
  • generate aliases for them;
  • the result will be an empty alias value, but excepted to see Pervaja-stranica (or something like this).
@Serhii-DV Serhii-DV changed the title [4.3. Bug] Generate aliases for pages with russian name is broken [4.3. Bug] Generate aliases for pages with russian names is broken May 25, 2017
@aschempp
Copy link
Member

aschempp commented May 25, 2017 via email

@fritzmg
Copy link
Contributor

fritzmg commented May 25, 2017

It should work in Contao 3, yes: https://github.com/contao/core/blob/master/system/helper/utf8_lookup.php#L189-L196

Probably duplicate of #560. The PR is still WIP: #569

@leofeyer
Copy link
Member

It is true that transliteration is broken in Contao 4 (since switching to patchwork/utf8 to be exact). And it can only be solved by #569, which we forgot to merge. But there are two solutions IMO:

  1. Do not transliterate at all.

We have already dropped transliteration for file and folder names in Contao 4.4.0-beta1, so why not just drop it for aliases, too? Any browser should be able to handle URLs like https://localhost/app_dev.php/ru/первая-страница.html.

  1. Use the Slugify service to transliterate.

The service might not handle all languages, otherwise its fine.

@contao/developers /cc

@leofeyer leofeyer self-assigned this May 29, 2017
@leofeyer leofeyer added the bug label May 29, 2017
@leofeyer leofeyer added this to the 4.4.0 milestone May 29, 2017
@leofeyer
Copy link
Member

I have removed the broken transliteration in 1dbbf9f. We might add Slugify in Contao 4.5, because it implies further changes (such as moving the forlderUrls setting from the localconfig.php file to the config.yml file) that I don't want to add this short before the final release.

@Toflar
Copy link
Member

Toflar commented May 29, 2017

To be honest, I think it depends. It's something that should be a setting of a root page. If you think in German, somebody might want to have URI's like foobar.de/über-uns.html and an other one would like to have foobar.de/ueber-uns.html. It's a matter of taste. Also I think prepend_locale as well as folderUrls are both settings that should be a root page setting, not a system setting. There are other tickets where people would like to have the main language to be accessible via www.domain.de and all translations via www.domain.de/{locale}. If it was configurable in the root page settings, I guess this would be possible too then. So I think we should mark that as a feature for 4.5.

@leofeyer
Copy link
Member

You should copy your comment to #569. This is just the bug report for the broken transliteration caused by Utf8::toAscii().

@tsarma
Copy link

tsarma commented Feb 15, 2019

Please make $arrSearch and $arrReplace customizable somewhere in global array. Striping away special characters in Tibetan language lose the meaning of the word.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants