vanderlee / phpSyllable

PHP Syllable splitter/counter and Hyphenator for text and HTML. Multi-language, customisable, cached and fast!
http://vanderlee.github.io/phpSyllable/
117 stars 34 forks source link

Replace / remove outdated German language file hyph-de.tex #47

Closed alexander-nitsche closed 1 year ago

alexander-nitsche commented 1 year ago

The

is 12 years old, unlike the more specific language files

which are 8 years old.

Also, hyph-de.tex is no longer available on https://tug.org/tex-hyphen/#languages or on the corresponding CTAN mirrors. Last but not least, the author of the hyphen patterns, Werner Lemberg, has confirmed that they once replaced the first general one with the more specific ones.

The question is technically whether the hyph-de.tex should be replaced by one of the others, since many projects might rely on it, or whether it should be removed completely?

vanderlee commented 1 year ago

Age of the english file isn't necessarily an issue. If the -de file is deprecated, then for backwards compatibility sake it would be best to either duplicate (easy fix) the replacement or have some internal mapping (clean fix) of "de" to whichever version should be considered the "official" language (I'm guessing de-1996?).

alexander-nitsche commented 1 year ago

Yes, hyph-de-1996 would be the official up-to-date one.

vanderlee commented 1 year ago

I can't really think of a good solution here beyond making an exceptional case of this in \Vanderlee\Syllable\Source\File::loadLanguage. If you agree, I'll just add some type mapping which will take effect if no actual language file is present. And also remove hyph-de.tex from the repo.

alexander-nitsche commented 1 year ago

We can work with the existing solution by using the same remote URL for fetching hyph-de-1996.tex as well as hyph-de.tex. The drawback is to provide the same file content via two filenames, but i would prefer that over a hardcoded extra rule for German. What do you think?

vanderlee commented 1 year ago

Resolved in #63