kiwix / libkiwix

Common code base for all Kiwix ports
https://download.kiwix.org/release/libkiwix/
GNU General Public License v3.0
112 stars 55 forks source link

Translation of search results page #1046

Closed veloman-yunkan closed 5 months ago

veloman-yunkan commented 5 months ago

Fixes #1028

Contrary to https://github.com/kiwix/libkiwix/pull/1032#issuecomment-1896002341, no front-end side translation is performed on the search results page. Instead the /search endpoint is called with the userlang query parameter explicitly provided. The downside is the reduced opportunity for HTTP-caching search requests coming from users using different UI languages.

Currently no real translations of messages related to search results are available. To test this change you will have to use the test language that is excluded from the UI language selector. It can be set by adding (once) ?userlang=test after /viewer in the browser address bar.

Known issues:

codecov[bot] commented 5 months ago

Codecov Report

Attention: 17 lines in your changes are missing coverage. Please review.

Comparison is base (795fcb9) 39.35% compared to head (34cd553) 39.36%.

Files Patch % Lines
src/search_renderer.cpp 15.78% 0 Missing and 16 partials :warning:
src/server/internalServer.cpp 0.00% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1046 +/- ## ======================================= Coverage 39.35% 39.36% ======================================= Files 58 58 Lines 4060 4075 +15 Branches 2236 2245 +9 ======================================= + Hits 1598 1604 +6 Misses 1091 1091 - Partials 1371 1380 +9 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

kelson42 commented 5 months ago

@veloman-yunkan I guess its time to rebase this PR.

veloman-yunkan commented 5 months ago

@veloman-yunkan I guess its time to rebase this PR.

@kelson42 You are right. I could sense the same recommendation in my horoscope for today and humbly complied with it.