-
-
Notifications
You must be signed in to change notification settings - Fork 120
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
Categories should not be translated in Kiwix-Desktop #972
Comments
@juuz0 How does it work currently if there is not Internet? There is a default list somewhere hardcoded in the list or does the category list is dynamically built from the local library? |
This. libkiwix returning the translation should work well |
@juuz0 so we could remove them from kiwix-desktop? If I understand right, all the category stuff is not data-driven, and therefore kiwix-desktop retrieves the values directly from the libkiwix without any API call? |
That is a really good question. But yes, now translations should be moved from kiwix-desktop to libkiwix. |
@ShaopengLin You (should) have the primitive alrady in the libkiwix to do that. Please just use them. |
@kelson42 I am unable to find any primitives. The getBooksCategories already get from libkiwix and they are all still using the i18n key string we have. The only thing I saw in libkiwix is in server/i18n.h (which I don't think is exportable), but the i18n translations of these i18n key strings are also not in libkiwix's static/skin/i18n. Please correct me if I am missing something obvious. |
@ShaopengLin Hmmm, I might be wrong then... because I just remarked that kiwix-serve categories are not translated either! Documentation is not helpful either. @mgautierfr @veloman-yunkan Could you please guide @ShaopengLin so he can implement this issue properly? It seems that something might have to be done at libkiwix level! |
|
@veloman-yunkan Thank you, should obviously not be related to the server, so not the proper ultimate code location. |
@kelson42 Absolutely. We will move the implementation as part of kiwix/libkiwix#1103. |
@veloman-yunkan Thx! |
@ShaopengLin All clear on your side for implementation? |
With the slugify PR I think I am comfortable with the libkiwix structure. Can probably have a PR on libkiwix to add the i18n translation for categories and expose the API. For Desktop If I am not mistaken, just need to replace the gt() calls with the exposed API. |
@ShaopengLin The whole retrieval of categories should come from the libkiwix, not only the translation. |
That makes sense, I will adapt the filtering with the translations. @kelson42 Just to make sure I do not make any more misconceptions: From the previous discussion, I assume all the categories need to be supported by libkiwix and OPDS retrieval of categories should be removed.
|
OPDS retrieval should not be removed, but this retrieval works only online. It should also properly work offline. |
Ok so I believe we actually are implementing two separate things:
Previously I got the idea that we are combining the changes into one, which is we only retrieve the translated categories. This should be a quick change in libkiwix then. |
Also in desktop we also don't seem to be doing translations either... I already have the change ready and after libkiwix goes through my change in this one will soon. |
@ShaopengLin Can you please push your code now that kiwix/libkiwix#1112 is merged? |
We have currently a lot of categories translation in the source code:
Translations should be done in libkiwix and made available via the kiwix-serve/https://library.kiwix.org.
Depends on kiwix/libkiwix#844
The text was updated successfully, but these errors were encountered: