pid / speakingurl

Generate a slug – transliteration with a lot of options
http://pid.github.io/speakingurl/
BSD 3-Clause "New" or "Revised" License
1.12k stars 84 forks source link

Fixed Turkish charmap #43

Closed serkandurusoy closed 9 years ago

serkandurusoy commented 10 years ago

Turkish use of phonetics and Turkish/Latin text entry/reading require that just the hyphens get removed. Therefore a representation of 'Ü' as 'Ue' is wrong where it should have been 'U' hence the edited fixes.

pid commented 9 years ago

Thanks for the hint, will fix this soon.

pid commented 9 years ago

Your pull request doesn't work, because for now, all translations would convert Ü -> U. We can already add this language specific transliterations in

    /**
     * langCharMap language specific characters translations
     * @type   {Object}
     */
    var langCharMap = {
        'en': {}, // default language
        'sk': {
            'ä': 'a',
            'Ä': 'A'
        },
        'tr': {
            'Ü': 'U',
            'Ö': 'O',
            'ü': 'u',
            'ö': 'o'
        }
    };

Fix will be published in v0.18.0

Thanks for contribution :+1:

serkandurusoy commented 9 years ago

Great! This now works as expected. Thanks.