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

no Norwegian? #16

Closed
juhp opened this issue Apr 30, 2023 · 10 comments
Closed

no Norwegian? #16

juhp opened this issue Apr 30, 2023 · 10 comments

Comments

@juhp
Copy link

juhp commented Apr 30, 2023

I couldn't find any Norwegian data in langtable?
Is that expected or surprising?

@mike-fabian
Copy link
Owner

I think it is there:

$ python3
Python 3.11.3 (main, Apr  5 2023, 00:00:00) [GCC 13.0.1 20230401 (Red Hat 13.0.1-0)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import langtable
>>> langtable.info()
Project name: = langtable
Version: = 0.0.61
Module path: = /usr/lib/python3.11/site-packages
Loaded from: /usr/lib/python3.11/site-packages/langtable/langtable.py
Data files read: ['/usr/lib/python3.11/site-packages/langtable/data/territories.xml.gz', '/usr/lib/python3.11/site-packages/langtable/data/languages.xml.gz', '/usr/lib/python3.11/site-packa
ges/langtable/data/keyboards.xml.gz', '/usr/lib/python3.11/site-packages/langtable/data/timezones.xml.gz', '/usr/lib/python3.11/site-packages/langtable/data/timezoneidparts.xml.gz']
>>> langtable.language_name('no')
'Norsk'
>>> langtable.language_name('nb')
'Norsk bokmål'
>>> langtable.language_name('nn')
'Norsk nynorsk'
>>> 

@mike-fabian mike-fabian self-assigned this May 2, 2023
@mike-fabian mike-fabian added this to To do in Mike’s github project board via automation May 2, 2023
@mike-fabian
Copy link
Owner

https://github.com/mike-fabian/langtable/blob/main/langtable/data/languages.xml contains:

  <language>
    <languageId>no</languageId>
    <iso639-1>no</iso639-1>
    <iso639-2-t>nor</iso639-2-t>
    <iso639-2-b>nor</iso639-2-b>
    <names>
    ...
    <name><languageId>en</languageId><trName>Norwegian</trName></name>
    ...
  <language>
    <languageId>nb</languageId>
    <iso639-1>nb</iso639-1>
    <iso639-2-t>nob</iso639-2-t>
    <iso639-2-b>nob</iso639-2-b>
    <names>
      ...
      <name><languageId>en</languageId><trName>Norwegian Bokmål</trName></name>
      ...
  <language>
    <languageId>nn</languageId>
    <iso639-1>nn</iso639-1>
    <iso639-2-t>nno</iso639-2-t>
    <iso639-2-b>nno</iso639-2-b>
    <names>
      ...
      <name><languageId>en</languageId><trName>Norwegian Nynorsk</trName></name>
      ...

@mike-fabian
Copy link
Owner

I think I can close this as the data seems to be there.

Mike’s github project board automation moved this from To do to Done May 2, 2023
@juhp
Copy link
Author

juhp commented May 2, 2023

Ah maybe I meant keyboard layout, but happy to be wrong

@mike-fabian
Copy link
Owner

Indeed, there is no Norwegian keyboard layout.

@mike-fabian mike-fabian reopened this May 2, 2023
Mike’s github project board automation moved this from Done to In progress May 2, 2023
@mike-fabian
Copy link
Owner

$ python3
Python 3.11.3 (main, Apr  5 2023, 00:00:00) [GCC 13.0.1 20230401 (Red Hat 13.0.1-0)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import langtable
>>> langtable.list_keyboards('de')
[]
>>> langtable.list_keyboards(languageId='de')
['de(nodeadkeys)', 'de(deadacute)', 'at(nodeadkeys)', 'ch', 'be(oss)']
>>> langtable.list_keyboards(languageId='de_DE')
['de(nodeadkeys)', 'de(deadacute)']
>>> langtable.list_keyboards(languageId='no')
['no']
>>> langtable.list_keyboards(languageId='nb')
['no']
>>> langtable.list_keyboards(languageId='nn')
['no']
>>> 

@mike-fabian
Copy link
Owner

So the important stuff works already without no being listed in keyboards.xml because languages.xml and territories.xml contain the information which layout should be used by default for a certain language and/or territory.

The keyboards.xml file is mostly for checking which layouts support ASCII and which don't. Layouts not in that file are assumed to support ASCII.
As 'no' is not there, it is assumed to support ASCII, which is correct. But I'll add it for clarity.

@juhp
Copy link
Author

juhp commented May 2, 2023

Ah I see, thank you - my misunderstanding then, just got confused by this.

@juhp juhp closed this as completed May 2, 2023
Mike’s github project board automation moved this from In progress to Done May 2, 2023
@mike-fabian
Copy link
Owner

I'll make a new release as there are a few changes in the name countries as well. Like this one:

-      <name><languageId>fil</languageId><trName>Turkey</trName></name>
+      <name><languageId>fil</languageId><trName>Türkiye</trName></name>

mike-fabian added a commit that referenced this issue May 2, 2023
@mike-fabian
Copy link
Owner

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

No branches or pull requests

2 participants