Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Danish not recognized #29

Closed
LuigiImVector opened this issue Jul 10, 2022 · 4 comments
Closed

Danish not recognized #29

LuigiImVector opened this issue Jul 10, 2022 · 4 comments

Comments

@LuigiImVector
Copy link
Member

LuigiImVector commented Jul 10, 2022

I was trying to use fpb.json to improve my telegram bot (EbookFoundation/free-programming-books#6263) and I noticed an anomaly, there is an element with no language:

{
  "language": {},
  "index": {},
  "sections": [
    {
       "section": "C",
       "entries": [
          {
             "url": "https://web.archive.org/web/20190701062226/http://artcreationforever.com/bgnet.html",
             "title": "Beej's Guide til Netvarksprogrammierung",

The problem is that on free-programming-books this file is called free-programming-books-dk but on the languages.js the Danish is equal to da.

I didn't create a PR to rename the file because I don't know which language code to use; ISO 639-2 list says that the code of Danish language is da.


Using the search the resources are there, although with some resources writing the full title does not find them, you have to delete a few characters, for example:

  • Object-oriented Programming in C#: you have to delete in C#
  • Objektorienteret programmering i Java: you have to delete ava

Obviously without language.code value the result is:
image

@davorpa
Copy link
Member

davorpa commented Jul 10, 2022

Danish full ICU locale code is da-dk

da: language
dk: country

https://www.localeplanet.com/icu/da-DK/index.html

so should be renamed in fpb

@LuigiImVector
Copy link
Member Author

let's wait for a response from @brogan20

@brogan20
Copy link
Contributor

As far as I can tell the file in fpb should be da as it is recognized as such in the site David listed here and also in the resource listed by ImVector. da-DK is the language code for Danish specifically in Denmark. The problem could be temporarily fixed in fpb-search by changing the code in languages.json to dk until the filename in fpb is changed

@davorpa
Copy link
Member

davorpa commented Jul 11, 2022

Solved. See PR EbookFoundation/free-programming-books#6909

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants