processwire / processwire-requests

ProcessWire feature requests.
40 stars 0 forks source link

Page Name - Default Character replacement #499

Open pmichaelis opened 1 year ago

pmichaelis commented 1 year ago

Page Name - Default Character replacement /processwire/module/edit?name=InputfieldPageName&collapse_info=1

I don't know if it is only a "german language specific" translation issue, but I edit theses character replacements on every installation:

ä=ae ã=a ß=ss ö=oe ü=ue

It would be great if this would be default.

teppokoivula commented 1 year ago

This behaviour is indeed largely language/locale specific. To be honest I'm not sure for what percentage of languages e.g. "ä=ae" vs. "ä=a" would make more sense, but I would argue that the defaults should not be changed at this point, since it would be a problem for many existing sites.

See this issue for reference: https://github.com/processwire/processwire-issues/issues/755.

szabeszg commented 1 year ago

I always need to add

ő=o
ű=u

because they are needed for Hungarian text but I would not request them to be added just because of that. I also add these anyway:

'=
’=
´=
.=
–=-
&=and
™=
·=-
%=percent

So I can add those two as well.

Plus

ö=o
ü=u

is what Hungarians prefer, btw.

BernhardBaumrock commented 1 year ago

Changing the default would definitely make no sense. What if we provided a list of replacements that can then be chosen from a select box to make the task less tedious?

RockMigrations has a file for German: https://github.com/baumrock/RockMigrations/tree/main/replacements because of that issue.

So if using RockMigrations you can just do this (eg in /site/migrate.php):

$rm->setPagenameReplacements("de");

https://github.com/baumrock/RockMigrations/blob/3621183888e9e36e59d9ec4711dcc69d70288c83/RockMigrations.module.php#L3531