Veloman Yunkan
0168764f4c
NameMapper detects all naming conflicts
...
Also this change leads to the change in the mapping (since conflicts
that previously went undetected and just overwrote the existing entry
are now rejected).
2024-03-06 11:43:43 +01:00
Veloman Yunkan
181893d31a
Cleanup after previous change
...
- Got rid of the continue statement
- Renamed the function parameter
- Fixed indentation
2024-03-06 11:43:43 +01:00
Veloman Yunkan
5b9daf0d9d
Extracted HumanReadableNameMapper::mapName()
...
No cleanup of the new function was performed to keep the diff minimal.
2024-03-06 11:43:43 +01:00
Veloman Yunkan
4e64d26ede
Added more name conflicts to NameMapper unit test
...
The extended setup of the NameMapper unit test demonstrates (by the fact
that this change doesn't break the tests that check the stderr) that
certain naming conflicts escape NameMapper's attention.
2024-03-06 11:43:43 +01:00
Veloman Yunkan
5e669cd65c
Deduplicated test output data
2024-03-06 11:43:43 +01:00
Veloman Yunkan
2749564424
Made entries in test library point to "different" files
...
Two entries in test library.xml used to point to the same file path.
Note that though the third entry pointed to a different file name
it is a symbolic link to the same file.
Now all three entries point to pseudo-different files (having the
same content behind them).
This change is needed so that tests don't break when detection of
conflicting book names is made stricter.
2024-03-06 11:43:43 +01:00
Kelson
ddde6db16f
Merge pull request #1061 from kiwix/release-3.1.0
...
Release 3.1.0
2024-02-25 15:11:31 +01:00
Emmanuel Engelhart
50d1394a0a
Add 13.1.0 Changelog
2024-02-25 15:11:13 +01:00
Emmanuel Engelhart
a6040b2ecd
Bump-up version to 13.1.0
2024-02-25 15:11:13 +01:00
Kelson
4e755bc949
Merge pull request #1062 from kiwix/compilation_warnings
...
Fixed compilation warnings
2024-02-25 15:01:17 +01:00
Veloman Yunkan
cfab4c946a
Fixed compilation warnings
2024-02-25 16:15:29 +04:00
Kelson
57a265f73c
Merge pull request #1059 from kiwix/translatewiki
2024-02-22 19:23:34 +01:00
translatewiki.net
3f945813f2
Localisation updates from https://translatewiki.net .
2024-02-22 13:07:51 +01:00
Veloman Yunkan
86100b39ed
Merge pull request #1047 from kiwix/translatewiki
...
Localisation updates from https://translatewiki.net .
2024-02-20 14:40:42 +04:00
Matthieu Gautier
b2ae6d1fca
Update i18n translation files.
2024-02-20 10:40:44 +01:00
translatewiki.net
e82b62c552
Localisation updates from https://translatewiki.net .
2024-02-19 13:07:49 +01:00
Kelson
5fba3f434e
Merge pull request #1054 from kiwix/polyfilljs
...
Enter polyfills.js
2024-02-15 16:04:45 +01:00
Veloman Yunkan
3ac36e8ebd
Enter polyfills.js
...
The `String.replaceAll` polyfill was borrowed (at 0% annual intereset
rate) from https://github.com/kiwix/kiwix-js/pull/1190/files .
2024-02-15 16:03:29 +01:00
Kelson
1babbc0e4a
Merge pull request #1043 from kiwix/bookmarks_migrations
...
Migrate bookmarks between books
2024-02-15 16:01:46 +01:00
Matthieu Gautier
6b05eeb24b
Add a small test on getBestTargetBookId and flavour.
2024-02-15 14:52:57 +01:00
Matthieu Gautier
73b855ce6b
Add a `getBestTargetBookId` directly taking bookName, flavour and date.
2024-02-15 14:52:57 +01:00
Matthieu Gautier
eaca7010bc
Fix definition of `UPGRADE_ONLY` and `ALLOW_DOWNGRADE`.
...
`MigrationMode` was kind of defined in the context of an internal mode
used by `migrateBookmark(...)`.
But now, with `getBestTargetBookId`, it is broken.
This commit fix that and the associated implementation.
Now `UPGRADE_ONLY` will make `getBestTargetBookId` return only newer books.
and `ALLOW_DOWNGRADE` will return older books only if current book is
invalid.
2024-02-15 14:52:57 +01:00
Matthieu Gautier
6efdc43964
Correcly search for book's title with double quote (").
...
At indexation time, double quote are ignored, so a title as
`TED "talks" - Business` is indexed as `ted talks business`.
By removing the quotes, we ensure that our title "phrase" is not closed
too early and we correctly search for `ted PHRASE talks PHRASE business`
instead of `ted AND talks AND business`.
2024-02-15 14:52:57 +01:00
Matthieu Gautier
7a0ab3a429
Update tests to check book's title with double quotes (")
...
On top of modifying the existing test, the commit also make
`MigrateBookmark` test fails as `migrateBookmarks` now migrates
from `wrong-book-id-noname` to `Dummy id`.
Fix will be provided in next commit.
2024-02-15 14:52:57 +01:00
Matthieu Gautier
3e9d50fecb
Make `getBestTargetBookId` public.
2024-02-15 14:52:57 +01:00
Matthieu Gautier
f3a604380c
Do not migrate bookmarks to an older book.
...
At least, it must be explicitly asked by the user.
2024-02-15 14:52:57 +01:00
Matthieu Gautier
167e0dc4b3
Only migrate bookmarks to books with the same flavour.
...
If there is no book with the same flavour, but book with same name and
different flavour, we do the migration to the other book.
2024-02-15 14:52:57 +01:00
Matthieu Gautier
14c9530afa
[Test] Introduce variant books in sample library.
...
We will need them to test flavour/date bookmarks migration.
2024-02-15 14:52:57 +01:00
Matthieu Gautier
8d97686b81
Introduce `migrateBookmarks` to move (invalid) bookmarks to new books.
2024-02-15 14:52:57 +01:00
Matthieu Gautier
b16f6b9561
Allow to filter books by flavour.
2024-02-15 14:52:57 +01:00
Matthieu Gautier
a546effa15
Allow bookmark to be created from a Book and url/title.
2024-02-15 14:52:57 +01:00
Matthieu Gautier
699f96ca0d
Add book's flavour in bookmark.
2024-02-15 14:52:57 +01:00
Matthieu Gautier
5a0644d32b
Also store book's name in bookmark.
2024-02-15 14:52:57 +01:00
Matthieu Gautier
903f476f77
Test bookmarks serializations.
2024-02-15 14:52:57 +01:00
Matthieu Gautier
bf1ab03332
[Test] Add missing flavour in books.
2024-02-15 14:52:57 +01:00
Matthieu Gautier
82cb1133e5
[Test] Add missing name in sample library.xml
2024-02-15 14:52:57 +01:00
Matthieu Gautier
9b9c61a194
Use a `recursive_mutex` instead of a `mutex`.
...
This allow us to internally call thread_safe function from already
locked context.
2024-02-15 14:52:57 +01:00
Matthieu Gautier
c768d05b5b
Merge pull request #1056 from kiwix/fix_macos_build
...
[CI] Fix macos python installation.
2024-02-15 14:52:19 +01:00
Matthieu Gautier
fe018efc70
Update to new macos' python 3.12
...
Brew update its receipe about python and now use python 3.12 instead of
python 3.11.
2024-02-15 14:16:29 +01:00
Matthieu Gautier
e625c25ef1
Merge pull request #1048 from Begasus/haiku
...
Haiku
2024-02-08 15:10:42 +01:00
Begasus
b2ae1d66f5
Fix for getifaddrs on Haiku
2024-02-08 11:52:37 +01:00
Begasus
2818dd3151
Fix undeclared SIOCGIFCONF for Haiku
2024-02-08 11:51:12 +01:00
Kelson
09eec822c1
Merge pull request #1046 from kiwix/translation_of_search_results_page
...
Translation of search results page
2024-02-01 21:33:25 +01:00
Veloman Yunkan
34cd553642
Updated languages.js
2024-02-01 18:33:34 +04:00
Veloman Yunkan
70dd738801
Front-end calls the /search endpoint with userlang
2024-02-01 18:31:32 +04:00
Veloman Yunkan
958067d94d
Backend translates the search results page
...
Now the search results page is presented by the backend in the language
controlled by the value of the `userlang` URL query parameter (or, if
the latter is missing, the value of the `Accept-Language:` HTTP header).
Note that the front-end doesn't yet take advantage of this
functionality.
2024-02-01 18:27:54 +04:00
Veloman Yunkan
33a3277400
Search result info as translatable text
...
However it is NOT actually translated by the backend yet
2024-02-01 18:27:33 +04:00
Veloman Yunkan
8f5714be07
Search results page header as translatable text
...
However it is NOT actually translated by the backend yet
2024-02-01 18:27:11 +04:00
Veloman Yunkan
c4fa42f20b
Search results page title as translatable text
...
However it is NOT actually translated by the backend yet
2024-02-01 18:22:36 +04:00
Matthieu Gautier
795fcb9de4
Merge pull request #1044 from kiwix/default_ui_language_is_resolved_in_the_frontend
...
Default UI language is resolved in the frontend
2024-01-31 17:54:56 +01:00