pkp / pkp-lib

The library used by PKP's applications OJS, OMP and OPS, open source software for scholarly publishing.
https://pkp.sfu.ca
GNU General Public License v3.0
299 stars 444 forks source link

Replace homegrown country, language, and currency codes with a 3rd-party library #5453

Closed asmecher closed 4 years ago

asmecher commented 4 years ago

We currently maintain our own lists of countries, languages, and currencies, each with their respective DAOs. It would be better to delegate the maintenance of these lists to a 3rd-party library to ease translation demands and decrease the amount of out-of-date information.

asmecher commented 4 years ago

PRs:

asmecher commented 4 years ago

@NateWr, would you mind taking a look at the PRs above (https://github.com/pkp/pkp-lib/issues/5453#issuecomment-579988179)? Thanks! (The incentive: 17,000 lines of code removed.)

NateWr commented 4 years ago

Looks great! And looks like we'll trim even more lines of code once we remove the deprecated DAOs. :+1:

This might be a good thing to get recorded in our main documentation. How to get a list of language and currency options, and how we store this information in the database. If there's any conditional logic that needs to be applied to the available options (see comment), that could be documented as well.

asmecher commented 4 years ago

Thanks, @NateWr! All merged. Yes, the only list that required conditionals was the language list, and it would've been nice for the upstream library to permit easier fetching of subsets (and document this aspect better) but they seem content to refer to the ISO639-3 documentation: https://github.com/sokil/php-isocodes#languages-database-iso-639-3 That said, I favour referring to the 3rd party resource rather than reiterating their documentation; this would be a good change to include in the 2.3 notes you've been building.