{"action":"created","issue":{"url":"https://api.github.com/repos/zenphoto/zenphoto/issues/1174","repository_url":"https://api.github.com/repos/zenphoto/zenphoto","labels_url":"https://api.github.com/repos/zenphoto/zenphoto/issues/1174/labels{/name}","comments_url":"https://api.github.com/repos/zenphoto/zenphoto/issues/1174/comments","events_url":"https://api.github.com/repos/zenphoto/zenphoto/issues/1174/events","html_url":"https://github.com/zenphoto/zenphoto/issues/1174","id":337490155,"node_id":"MDU6SXNzdWUzMzc0OTAxNTU=","number":1174,"title":"Contradictory conversions in seo_zenphoto extension","user":{"login":"kochs-online","id":17382358,"node_id":"MDQ6VXNlcjE3MzgyMzU4","avatar_url":"https://avatars1.githubusercontent.com/u/17382358?v=4","gravatar_id":"","url":"https://api.github.com/users/kochs-online","html_url":"https://github.com/kochs-online","followers_url":"https://api.github.com/users/kochs-online/followers","following_url":"https://api.github.com/users/kochs-online/following{/other_user}","gists_url":"https://api.github.com/users/kochs-online/gists{/gist_id}","starred_url":"https://api.github.com/users/kochs-online/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kochs-online/subscriptions","organizations_url":"https://api.github.com/users/kochs-online/orgs","repos_url":"https://api.github.com/users/kochs-online/repos","events_url":"https://api.github.com/users/kochs-online/events{/privacy}","received_events_url":"https://api.github.com/users/kochs-online/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-02T12:04:16Z","updated_at":"2018-07-02T13:07:10Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"I came back to [this age-old thread](https://forum.zenphoto.org/discussion/1292833/) and tried to write a plugin to change the names of new album folders to lower-case. I also wanted to convert some special characters used in the German language ([ß](https://en.wikipedia.org/wiki/%C3%9F) and [Umlauts](https://en.wikipedia.org/wiki/Germanic_umlaut)) into their basic Latin alphabet transcriptions (ä → ae, ö → oe, …).\r\n\r\nThat being said I discovered that there already is an official extension named [seo_zenphoto](https://www.zenphoto.org/news/seo_zenphoto/) that's supposed to do exactly this. I gave it a test run and noticed that while it replaces \"ä\" with \"ae\" and \"ö\" with \"oe\", it replaces \"ü\" with \"u\" instead of \"ue\" as expected.\r\nThe reason for this is that there are some duplicates in the large replacement array `$specialchars` of `seo_zenphoto.php`. One of these entries replaces \"ü\" with \"ue\" and two more entries replace \"ü\" with \"u\".\r\n\r\nHere is a list of the duplicates I found (that comparison wasn't exactly a work of science so there might be more :wink:):\r\n\r\n- Å\r\n- Ḭ\r\n- Ḷ\r\n- ø\r\n- Ø\r\n- ŕ\r\n- ř\r\n- ŗ\r\n- ü\r\n- Ü\r\n- ǖ\r\n\r\nNot all of these duplicates are contradictory, but some are.\r\nI don't know the source of the list used for that array, but maybe it was locale-dependent? Should this replacement be locale-aware as well?\r\n\r\n**Bonus round:** The [capital ẞ](https://en.wikipedia.org/wiki/Capital_%E1%BA%9E) is missing in the list of replacements. Correct replacement would be \"SS\".\r\n\r\n**Bonus round number 2:** When starting to write my own extension I tried to keep Zenphoto's standard behavior for replacements and just add my own set. Unfortunately this is either/or. So you can **either** have Zenphoto's set of replacement rules **or** your own, but cannot combine them and maintaining an extension would require you to check all new versions if Zenphoto's implementation has changed. Any chance to improve this?"},"comment":{"url":"https://api.github.com/repos/zenphoto/zenphoto/issues/comments/401798065","html_url":"https://github.com/zenphoto/zenphoto/issues/1174#issuecomment-401798065","issue_url":"https://api.github.com/repos/zenphoto/zenphoto/issues/1174","id":401798065,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTc5ODA2NQ==","user":{"login":"acrylian","id":2474309,"node_id":"MDQ6VXNlcjI0NzQzMDk=","avatar_url":"https://avatars3.githubusercontent.com/u/2474309?v=4","gravatar_id":"","url":"https://api.github.com/users/acrylian","html_url":"https://github.com/acrylian","followers_url":"https://api.github.com/users/acrylian/followers","following_url":"https://api.github.com/users/acrylian/following{/other_user}","gists_url":"https://api.github.com/users/acrylian/gists{/gist_id}","starred_url":"https://api.github.com/users/acrylian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acrylian/subscriptions","organizations_url":"https://api.github.com/users/acrylian/orgs","repos_url":"https://api.github.com/users/acrylian/repos","events_url":"https://api.github.com/users/acrylian/events{/privacy}","received_events_url":"https://api.github.com/users/acrylian/received_events","type":"User","site_admin":false},"created_at":"2018-07-02T13:07:10Z","updated_at":"2018-07-02T13:07:10Z","author_association":"MEMBER","body":"- Duplicates: That might have sneaked in as this list was from sources and extended manually as there is no way to automate this\r\n- Bonus round: I am sure when this was introduce there was no captial ß at all ;-) (And I won't get into that all capital ß I saw so far are typographical disasters ;-))\r\n- Bonus round 2: Yes, its a plugin. But there might be a chance in the next major release."}}
{"actor":{"display_login":"acrylian"}}