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

[FR] Fix support for "ar-cf" template #1844

Closed
BoboTiG opened this issue Sep 26, 2023 · 1 comment · Fixed by #1849
Closed

[FR] Fix support for "ar-cf" template #1844

BoboTiG opened this issue Sep 26, 2023 · 1 comment · Fixed by #1849

Comments

@BoboTiG
Copy link
Owner

BoboTiG commented Sep 26, 2023

Wikicode:

{{ar-cf|ar-*a*aba|ar-c3b}}

Output:

  File "wikidict/lang/fr/__init__.py", line 1089, in last_template_handler
    else f"« {clean(racines_schemes_arabes[parts[1]][parts[0]])} »"
                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
KeyError: 'ar-*a*aba'

Wikicode:

{{ar-cf|ar-*i*a*ũ|ar-jnn}}

Output:

  File "wikidict/lang/fr/__init__.py", line 1089, in last_template_handler
    else f"« {clean(racines_schemes_arabes[parts[1]][parts[0]])} »"
                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
KeyError: 'ar-*i*a*ũ'
@lasconic
Copy link
Collaborator

lasconic commented Oct 3, 2023

The first one is easy, we just need to safe guard the access of of the array.

The other ones... we need to update the scripts from the Lua source... It will take some more time.
https://fr.wiktionary.org/w/index.php?title=Module%3Aarabe&diff=32695780&oldid=31275068

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

Successfully merging a pull request may close this issue.

2 participants