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

URL Slugs are not properly converted from Japanese #2334

Closed
manuelmoreale opened this issue Dec 2, 2019 · 7 comments
Closed

URL Slugs are not properly converted from Japanese #2334

manuelmoreale opened this issue Dec 2, 2019 · 7 comments
Assignees
Milestone

Comments

@manuelmoreale
Copy link

@manuelmoreale manuelmoreale commented Dec 2, 2019

Describe the bug

Screenshot 2019-11-29 at 11 16 27 1

To Reproduce
Steps to reproduce the behavior:

  1. Create a page using Japanese characters for the title
  2. Watch nothing happen

Additional context

There's a few pages on the topic on Wiki

https://en.wikipedia.org/wiki/Nihon-shiki_romanization
https://en.wikipedia.org/wiki/Romanization_of_Japanese

Pinging @distantnative since I think he's the one that was working on this one.

@afbora

This comment has been minimized.

Copy link
Contributor

@afbora afbora commented Dec 2, 2019

We can solve this issue with;

  1. Adding Japanese characters to Str::$ascii in Kirby core
    https://github.com/getkirby/kirby/blob/master/src/Toolkit/Str.php#L32

  2. Defining on Str::$language in user application dynamicly
    https://getkirby.com/docs/reference/system/options/slugs

@distantnative

This comment has been minimized.

Copy link
Contributor

@distantnative distantnative commented Dec 2, 2019

@afbora no need for that. We simply have no japanese rule set in i18n/rules. We will have to create one and then all will be working.

@afbora

This comment has been minimized.

Copy link
Contributor

@afbora afbora commented Dec 5, 2019

@distantnative I tried to add it, but the Japanese alphabet was very complicated 😅

@manuelmoreale

This comment has been minimized.

Copy link
Author

@manuelmoreale manuelmoreale commented Dec 5, 2019

@afbora who would have thought ahah
Jokes aside, if there's anything I can to to help you guys out let me know.

@PaulMorel

This comment has been minimized.

Copy link

@PaulMorel PaulMorel commented Dec 10, 2019

I guess this would be easy with hiragana and katakana. Would it be even possible for kanji?

Each kanji character has multiple readings depending on the context or definition used.
For example, 山 is often read and romanized as yama or san. Kirby would have to be able to understand the context of your page title to write an accurate slug.

Note I know very little japanese, so take what I say with a grain of salt, but as a developer I see this as a potential road block.

@distantnative distantnative self-assigned this Dec 14, 2019
@distantnative distantnative added this to the 3.3.3 milestone Dec 14, 2019
distantnative added a commit that referenced this issue Dec 14, 2019
distantnative added a commit that referenced this issue Dec 14, 2019
@distantnative

This comment has been minimized.

Copy link
Contributor

@distantnative distantnative commented Dec 14, 2019

@manuelmoreale @PaulMorel
There is a PR now adding conversion for japanese: #2350

@PaulMorel
I am aware of these problems. No slug algorithm will be able to cater to that complexity. I still think it's good to add some basic conversion rules, so that the slug field does not remain blank. Manual corrections might still be necessary for editors, that is true.

bastianallgeier added a commit that referenced this issue Jan 9, 2020
@bastianallgeier

This comment has been minimized.

Copy link
Contributor

@bastianallgeier bastianallgeier commented Jan 9, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
5 participants
You can’t perform that action at this time.