Skip to content

Releases: HugoFara/lwt

External text reader, cleaner database management, and much more!

01 Apr 17:49
Compare
Choose a tag to compare

This release is composed of many small enhancements, but also of many regular bug fixes.

Added

  • Support for Japanese with MeCab on Mac! This was added thanks to quopquai on #135.
  • New globals (#163):
    • On inc/kernel_utility.php: LWT_APP_VERSION and LWT_RELEASE_DATE.
    • On api.php: LWT_API_VERSION and LWT_API_RELEASE_DATE.
    • src/js/jq_pgm.js: LWT_DATA.
    • unloadformcheck.js now declares a new object lwtFormCheck that contains all the functions needed.
  • Important additions to Text-To-Speech (TTS):
    • Word can be read on hover or on click. Pull request #147 by @ProgramComputer.
    • You can add a custom text reader with the new voice API feature! A courtesy of @ProgramComputer on pull request #153. A feature first requested on #143. Discussion in open on #174.
    • New JS functions: readTextWithExternal to read a text with an external application and speechDispatcher that can choose a text reader (browser or third party).
  • Starts a cleaner database management. Database schema is defined in db/schema/baseline.sql and no longer in PHP code.
  • You can choose to add romanization for languages that don't need it in the language settings (#119).
  • Docker images are now built for multiple platforms, see PR #169, closing discussion
    #141. Many thanks to @ProgramComputer!
  • On word review:
    • The "Read words aloud" setting is now saved, PR #185.
    • UX change: You can click on "Read words aloud" text to check the checkbox.

Changed

  • Adds missing documentation in the Docker image:
    • MarkDown files in the root folder are now included. See #160. It adds README.md and UNLICENSE.md.
    • Adds docs/info.html and docs/index.html from #146.
  • Multi-word creation was reviewed to use a simpler JS code.
  • Word review:
    • Status + 1 can be set only after word display. Before, you could press key up at any time to increase term status, but keydown was effective only after solution display (#159).
    • When testing sentences, sentences are always displayed, even when less than 70% of words in the sentence are known. See #194.
  • New files:
    • inc/feeds.php and inc/tags.php, stemmed from inc/session_utility.php. It should not lead to any code or behaviour change.
    • src/js/overlib_interface.js, stemmed from src/js/pgm.js. It contains all the overlib interactions.
    • src/js/src/js/text_events.js, stemmed from src/js/jq_pgm.js. It defines interactions with a text on reading.
  • For audio URI, raises the characters length limit from 200 to 2048
    (#144).
  • Database:
    • For Linux users, the official database RDBMS recommended is now MariaDB as a drop-in replacement of MySQL.
    • Database creation and migration is now handled directly in SQL, for a safer behavior.
    • You do no longer need to give to LWT SYSTEM_VARIABLES_ADMIN for text reparsing. (new function checkExpressions) (#167). It is still necessary for words import.
  • Docker changes:
    • By default, the images now runs at localhot/lwt and no longer in the
      root folder (installer #4
      and #169).
    • Image updated from apache-buster to apache-bullseye.
  • Composer dependencies up to date 2024-03-24.

Fixed

  • The database wizard was broken since 2.9.0.
  • Word status:
    • It was impossible to change a word status on hover since 2.9.1.
    • Having wrong dictionary link and error reporting enabled prevented word status from being changed.
  • Avoids JavaScript error on editing a language when the dictionary field is empty.
  • For some feeds, feed wizard session was not working due to ill-configured session. Solves #129, thanks to the help of PR #168.
  • Text reading position was not working consistently when adding several known words.
  • Multi-words:
    • Tooltip was not properly saved (#170).
    • Translation may be escaped two times (#170).
    • Fixes #170: on creation, multi-word was always displayed before the text it encompasses, without removing this text.
    • Tootltip title was not properly saved, normally without incidence on user display.
    • Fixes #69: having the same multi-word on multiple texts was displaying it at many positions on creation.
  • Japanese:
    • Parsing Japanese texts with MeCab was creating warnings when the text was not finishing by a punctuation mark.
    • Multi-words were not saved with MeCab parsing on Japanese.
    • Japanese was always requiring MeCab for TTS, even if it was not used (#155) and #182.
  • On word review (test):
    • Space keyboard shortcut may have been inoperative.
    • On api.php, tests were always set to "multi-word" due to a missing variable type conversion. Pull request #175.
    • Text-To-Speech was not working (suggested by #187).
    • Testing terms (Terms > Multi Actions > Test ALL Terms) was broken since 2.9.0. #192.
  • An explicit dependency to php-dom was missing in INSTALL.sh (and composer.json), as stated in #178.
  • API: the REST API was not accessible for users running LWT in a root folder.
  • On audio, the replay button is fixed: issue #138 and PR #191.
  • The field SeFirstPos was missing in table sentences of demo database, resulting in failed installation the first time.
  • Editing test annotation would not display since 2.9.1 #193.

Deprecated

  • Using any function from unloadformcheck.js without using lwtFormCheck is deprecated.
  • get_database_prefixes is deprecated, superseded by getDatabasePrefix which is much cleaner.
  • Globals defined in jq_pgm.js are going into a single global LWT_DATA.
  • New text creation workflow simplified in inc/database_connect.php: update_default_values replaced by
    registerSentencesTextItems and check_text by displayTextStatistics.

Full Changelog for 2.10.0-fork

2.9.1

29 Dec 11:44
Compare
Choose a tag to compare

This patch is mainly made of bug fixes.

Yet it also features a new JS documentation https://hugofara.github.io/lwt/docs/js/ and an enhanced PHP documentation https://hugofara.github.io/lwt/docs/php/.

Special @ProgramComputer for his insights, pull requests and issues. @HenryWales and @PeterHero were also great to contributor to this release by documenting bugs. Thank you all!

Added

  • New tools for documentation:
    • New JavaScript documentation with JSDoc! You will find it under docs/js/.
    • Better PHP documentation using phpDocumentor. The new documentation is at docs/php/.
  • New constant LWT_LANGUAGES_ARRAY, that replaces $langDefs (in inc/langdefs.php). Part of #163.

Changed

  • PHP files header docblocks are expanded, notably with a PHP version, package and category name.
  • Japanese number are now parsed by MeCab. Big thanks to @ProgramComputer for his pull request #149!
  • Removes dead feeds from the demo database, as signaled in #148.
  • Patch update to the REST API to 0.1.1: requests on GET with empty payload were
    resulting in error.

Fixed

  • Fixes #113: changing a language name was making text-to-speech unusable and may prompt a warning.
  • Since 2.9.0, tests may be unable to run due to a missing key in an AJAX request ("type").
  • Since 2.9.0, audio position was not saved properly.
  • On upload_words.php, "update only empty fields" was broken.
  • Translation were not set by default properly when editing terms translations table.
  • The field MeCab was set for Japanese even when not asked for. Signaled on PR #155], thanks to @ProgramComputer.
  • Since 2.8.1, Japanese word romanization was not displayed any more. Thanks to 아르노 for signalling the bug on Discord!
  • The go slower/faster feature on audio was broken (#138), as functions click_slower
    and click_faster were declared two times in src/js/audio_controller.js.
  • When opening a text, text position was not saved and a text_id is unknown error was triggered.
  • Do not display an error on step 2 of feed wizard at first initialization (#129).
  • It was impossible to install the demo database if they was more or less than one instruction a line.
    This is fixed, and the SQL file was made more readable.
  • Changes WoStatusChange default value to '1970-01-01 01:00:01', it was impossible to install the demo DB out of LWT (related to (#78).
  • Deleting a language deletes the language (#151). Before it was setting the language to empty values.
  • On media select, the lwt folder name was prepended to the media folder,
    resulting in broken path (#161).
  • With the REST API, requests with an empty query were resulting in an error.
  • no-minify composer command was fixed, suggested as a part of PR #154 by
    @ProgramComputer.

Deprecated

  • PHP documentation using Doxygen (under docs/html) is now deprecated and will be removed in 3.0.0.
  • Using $langDefs is deprecated in favor of LWT_LANGUAGES_ARRAY (#163).
  • Calling the global function new_pos to set audio position is deprecated. Please use lwt_audio_controller.setPosition.

Full Changelog

2.9.0: RESTful and fixes

24 Dec 12:29
Compare
Choose a tag to compare

After more than half a year since the latest release, LWT 2.9.0 fixes numerous bugs and brings something big: a new REST API! It is now possible to interface LWT with other apps, and the development will feel better than ever!

Added

  • langFromDict and targetLangFromDict are now officially going to the
    kernel utility functions.
  • Text and title boxes change language according to the text's language for
    short text creation/edition, long text creation and text check
    (#111).
  • Refactored texts with OOP:
    • New class: Text (in inc/classes/Text.php).
    • New function: edit_texts_form (in edit_texts.php) that takes a Text object as input.
  • Tests (checking if you know words) now use AJAX (#112), it has several advantages:
    • Musics play fully
    • Page do not need to reload.
    • The timer continues instead of resetting.
  • REST API, the new api.php is intended to continue developing itself
    as a REST API. It features the following interaction:
    • On GET, the endpoints are:
      • /media-files: the list of audio and video files in the media folder.
      • /sentences-with-term: sentences containing a new term.
      • /sentences-with-term/{term-id}: sentences containing a registered term.
      • /similar-terms: terms similar to a given one.
      • /theme-path: the path for a media using theme.
      • /terms
        • /imported: imported terms.
        • /{term-id}/translations: translations for a term.
      • /review
        • /next-word: next word to review.
        • /tomorrow-count: number of reviews for the next day.
      • /phonetic-reading: phonetic reading for a term or sentence.
      • /texts/statistics: word statistics on texts.
      • /version: REST API version.
    • On POST, the endpoints are:
      • /settings: save a setting.
      • /terms followed by:
        • /{term-id} for any term update, in particular:
          • /status, to change the status, followed by either:
            • /down: decrement status of a term by one unit.
            • /up: increment status of a term by one unit.
            • /set/{new-status}: set the status of a term.
          • /translations: add a translation for an existing word.
        • /new: add a translation for a new word.
      • /texts/{text-id} followed by:
        • /annotation: change the text annotation
        • /audio-position: change audio position.
        • /reading-position: change the reading position.
  • Similar terms mark the word edit form as edited only if something was
    actually changed.
  • You can now specify a socket for your database through $socket in
    connect.inc.php. This feature was brought to you by
    @hangug-eo in his PR
    #132.
  • You can now change the voice of the TTT feature through
    text_to_speech_settings.php.
  • server_data.php was reorganized and is more informative with details
    about the REST API.

Changed

  • User Interface Improvements:
    • Prettier UI to navigate between text creation/edition/archive pages.
    • flex-spaced now sets the property of text-align: center;. This property was inherited before.
    • The long text import page looks a bit nicer.
  • User Experience:
    • When reading text, you can click on "Show All" and "Translations" to click the checkbox.
    • When changing a word status, the displayed messaged is now more informative: before database change, success message, now: waiting screen, tentative database change, result message (error or success). Under the hood, we are transitioning from pure PHP to AJAX.
    • It is faster to exit a text page: audio and reading position saves are now asynchronous.
  • Annotations "order" are now identical to Ti2Order (in textitems2). It makes management easier, but users may need to reload the annotations once.
  • Updated composer dependencies (up-to-date 2023-11-23).

Fixed

  • When editing an existing text, surrounding spaces are no longer inserted (#92).
  • Language code is better detected from translator URL when editing an existing language.
  • The field "Short Text Import" on long text import and was not redirecting to
    the intended page. Same goes for "New Text" on "Archived Texts" page.
  • It was impossible to archive more than one text (#118).
  • Testing a word was not changing it's color.
  • A warning was sent 'Undefined array key "query"' when creating a new word (#121).
  • A warning when savings settings in settings.php was sometimes displayed (#121).
  • Test header was different when testing languages or terms since 2.1.0-fork.
  • Wrong link to documentation (info.php instead of docs/info.html). Signaled by Mooncake on Discord.
  • Text reading:
    • The reading button is usable at last! Clicking the button a second time stops the reading process (#108).
    • Text language code was often not recognized in TTT settings (text_to_speech_settings.php).
    • Clicking the "Read" button in TTT Settings was refreshing the page.
  • It was impossible to copy a similar term that had apostrophes (#127).
  • A deprecation warning for trim was sent in simterms when no similar term was found.
  • During a text creation, the media_uri property of Text was used instead of source. Thanks to @hangug-eo for his PR #133!
  • When looking for an audio file on file edit/creation, the displayed path may have been wrong for characters between 0x80 and 0x9F.
  • Multi-words were not properly highlighted for languages separating each
    character as a word (e. g.: Chinese). Big thanks to @hangug-eo for signaling the issue and solving it in his PR #140!
  • The database wizard was not correctly saving the password. This is fixed by
    @hangug-eo in #132.
  • The list of translations of a term was sometimes not found on
    text annotation edition.

Deprecated

  • Legacy AJAX API. The following AJAX interactions are now deprecated in favor to the new REST API (at api.php):
    • inc/ajax_show_similar_terms.php, use /similar-terms on GET, simterms_lgid becomes lg_id and simterms_word term.
    • inc/ajax_add_term_transl.php
      • For a new term, use /terms/new. lang becomes lg_id, text is term_text.
      • To update an existing term, use /terms/{term-id}/translations. Same arguments.
    • inc/ajax_check_regexp.php should no longer be used and will be removed.
    • inc/ajax_chg_term_status.php should be accessed through /terms/{term-id}/status. Argument data is now part of the URL, on post only.
    • inc/ajax_get_phonetic.php should be accessed through /phonetic-reading, same arguments.
    • inc/ajax_get_theme.php should be accessed through /settings/theme-path. Argument filepath is now path.
    • inc/ajax_save_setting.php should be accessed through /settings, k becomes key and v value.
    • inc/ajax_save_text_position.php should be accessed through /texts/{text-id}/reading-position, tposition is now position.
    • inc/ajax_word_counts.php should be accessed through /texts/statistics, on GET. Argument id is now texts_id.
    • inc/ajax_update_media_select.php should be accessed through /media-files.
    • inc/ajax_show_sentences.php should be accessed through /sentences-with-term, on GET. Argument lang is now lg_id, word is word_lc and woid is word_id, ctl is no longer required.
    • inc/ajax_show_imported_terms.php should be accessed through /terms/imported, same arguments.
    • inc/ajax_save_impr_text.php should be accessed through /texts/{text-id}/annotation, id is now optional.
    • inc/ajax_edit_impr_text.php:
      • On display, using word="" is now deprecated as the page loads in pure PHP.
      • On term edition, should be accessed through /terms/{term-id}/translations, id is now text_id and word becomes text_lc.
  • During a word review (test), a "free" test where the user design there own test SQL is now deprecated and will be removed.

Security

  • During tests (word review), test data is no longer be send as raw SQL string, except for "free" test.

Full Changelog

2.8.1: regular bug crushing

14 Apr 05:35
Compare
Choose a tag to compare

This release fixes some small issues. In particular, you should see multi-words more often!

Changed

  • Updated some documentation screenshots: home screen, language edition and terms upload.

Fixed

  • Since 2.8.0-fork, PHP installations with ext-dom absent or disabled could not display text.
  • Using the import terms feature, it is better detected if local infile is enabled.
  • Since 2.2.2-fork, many multi-words were not displayed, as explained in #70. Issues may remain.
  • Auto-translation of all words (bulk translate) could not open dictionaries starting with '*'.
  • Since 2.7.0-fork, using a dictionary starting with "ggl.php" was creating a fatal error on opening text.

Full Changelog

2.8.0: UX/UI refreshment

08 Apr 07:51
Compare
Choose a tag to compare

This somehow shorter release brings a bunch of small but important fixes, and a much better responsive design (it'll both look nicer on your phone and 4K TV!).

Added

  • Responsive design improved: LWT gets easier to visualize on phone and big screens!

Changed

  • The language settings wizard is now open by default on new language creation.
  • Potential breaking change in the way words are displayed while reading. The target was to make the code more robust.
  • item_parser and echo_term in do_text_text.php now both takes an optional $expr argument.
  • Terms import form changed for a simpler presentation. It becomes easier to use to use on your phone.
  • Many tables are now displayed larger (when your screen has the available space).
  • Updated composer dependencies.

Fixed

  • Removed warnings: dictionaries URL without query do no longer raise warnings.
  • Feeds:
    • Click "New Text" on the first page of do_feeds.php had no effect. Changed to "New Feed".
    • Step 2 of feed wizard was sometimes failing because $_SESSION['wizard']['host'] was a string an not an array.
    • Type error in get_links_from_new_feed was breaking step 2 of feed wizard.
    • Loading feeds could result in malformed SQL, see #100. Thanks @maanh96 for the hint!
  • Docker: media/ was neither accessible nor saved to a container (#106). Thanks to @parradam for signaling and solving the issue!
  • On creating a language, the Glosbe dictionary comes with a "?lwt_popup=1" to open in new window by default.
  • Japanese pronunciation: works even if the language is not exactly called "Japanese", see #103.
  • Expressions containing word feature repaired! #90.
  • On text-to-speech settings, the region was often not displayed.

Full Changelog

2.7.0: the Dust-blower

14 Mar 03:46
Compare
Choose a tag to compare

This is a huge release implementing many things I wanted to have in LWT. As for the most important features you get:

  • Auto-translation (using ggl.php)
  • Auto-romanization of Japanese
  • Responsive design
  • And much more...

Added

  • The translation and romanization of new words can now be automatic.
    • Supported automatic translation is achieved using LibreTranslate.
    • Romanization using MeCab (Japanese only) toward katakana only.
  • A lot of improvements for language creation/edition:
    • More intuitive fields, better interactions with the user, etc...
    • A "Pop-Up" checkbox helps you choose if the website should be displayed in a pop-up.
  • LWT becomes easier to install and maintain for users:
    • An installer for Linux users at INSTALL.sh helps installing requirements and configuration.
    • Database creation wizard (database_wizard.php) to help setting the connection with the database.
    • A server data page at server_data.php showing all relevant information.
  • In index.php:
    • get_server_data_table replaces get_server_data as a better designed function.
    • index_do_main_page now renders the page to avoid global variables.
    • You get warnings if the PHP version is too low, or if a newer version of LWT is released.
  • pagestart_kernel_nobody in inc/kernel.php that displays the minimal HTML formatting.
  • inc/classes/ folder for a better incorporation of OOP.
    • inc/classes/Term defines the Term class representing a word or multi-word.
    • inc/classes/Language defines the Language class representing a language.
  • Post-Install Documentation added:
    • MeCab without and with Docker, Thanks to @99MengXin for the link (#94).
    • LibreTranslate integration.
    • TTS issues, as suggested by @asdrubalivan in #85.

Changed

  • Graphic review:
    • Headers reviewed. Most h4 headers became div.bigger, and h3 became h1 level headers.
    • We now use responsive design instead of fixed-size.
    • All themes updated accordingly, so themes were modified.
    • do_text_page (do_text.php) and do_test_page (do_test.php) now enlarge the body.
  • echo_lwt_logo in inc/session_utility.php echoes a logo, without information on the table set used
    because it was useless. This information is now displayed on the welcome page.
  • Access to the database prefix edition at start.php was reviewed and simplified. It is still considered a legacy feature.
  • Language creation reviewed:
    • When creating a new language, the language wizard do no longer display in a pop-up but in the main window.
    • Select option boxes replaced by checkboxes (better accessibility).
  • Updated hoverIntent jQuery Plug-in
    from 1.8.0 to 1.10.2. This brings some bug fixes.
  • "TO DO" changed to a more explicit "Unknown words" in text header.
  • Refactored bulk_translate_word.php. It has a better visual aspect and works better.
  • Updated composer dependencies.
    • vimeo/psalm updated from ^4.12 to ^5.6.
    • phpunit/phpunit updated from ^9.5 to ^10.0.
  • Changed to the text from YouTube feature (text_from_yt.php):
    • Refactored.
    • Moved from root folder to inc/.
    • This is still an experimental feature!
  • Moved Google API files:
    • Moved googleTimeToken.php from root folder to inc/google_time_token.php.
    • Moved googleTranslateClass.php from root folder to inc/classes/GoogleTranslate.php.
  • Updates in demo database:
    • Faster to install. install_demo_db_sql.gz uncompressed to install_demo_db.sql. Functions adapted.
    • Dict links changed: ### replaced by lwt_term, * replaced by lwt_popup=1, some dict url protocol changed to https.

Fixed

  • Markdown: enforced consistency with official style recommendations. The documentation display got improved.
  • The default date for new words was note accepted depending on the SQL configuration, causing issues with Docker installation. See #78.
  • Bulk translate words:
    • Translating with bulk translate was not updating word rendering.
    • All broom icons icon were display in the screen top-right corner, and not
      at the right if text field.
  • Main page (index.php) was not rendered properly on non-default theme.
  • Changing language name was breaking this, this is fixed:
    • Text header was sometimes not available.
    • It was breaking full text-to-speech dispatcher. Issue signaled with issue #80
  • Support for PHP 7.4 restored, wrappers for str_starts_with, str_ends_with, str_contains.
  • The encoding of docs/info.html is finally fixed!
  • ggl.php feature fixed!
  • Multi-words:
    • Sometimes multi-words indicator was cut, resulting in strange display (#89).
    • For Japanese: multi-words indicator was before each character, this is fixed #96.
  • Wrong link to documentation (docs/info.php instead of docs/info.html) on the help button (main page). Signaled by babaeali on Discord.
  • Depending on browser, clicking on deletion button for active texts had no effect.

Deprecated

  • Dictionary and translator URIs changed:
    • They should always be proper URLs.
    • Replacing ### by lwt_term is strongly recommended!
    • "*" At the beginning of an URI should be replaced by lwt_popup=1 as an argument.
    • ggl.php should be replaced by the file full URL, for instance "http://localhost/lwt/ggl.php".

Full Changelog

2.6.0: a last stand

01 Jan 10:22
Compare
Choose a tag to compare

This is and will be probably my biggest LWT release. It fixes many different topics, so please take your time looking at it. Once again, great thanks to @jzohrab for it's incredible support toward this release!

Added

  • Frames resizing is back! The text reading and test interfaces updated in several ways. Based on several suggestions such as #60.
    • The desktop interface is now much similar to what it was before 2.2.1-fork.
    • The mobile interface for texts unchanged (2.2.1-fork to 2.5.3-fork).
    • You can resize frames on desktop.
  • Many new functions officially introduced in PHP and JS. Some of these function were already present in the code but undocumented.

Changed

  • UX: Faster testing: you do no longer need to enter "Space" first for speed testing, except for status down and change. Related to #71.
  • UI:
    • Do no longer show "[]" near words when they are no tags. getWordTagList behavior changed (inc/session_utility.php).
    • Tests have a better general aspect thanks to CSS cleanning.
  • PHP:
    • do_test.php, edit_texts.php, edit_words.php and set_test_status.php now explicitly require a running session. They were silently failing before this release.
    • save_setting_redirect.php moved to inc/save_setting_redirect.php.
    • Psalm static code analysis of all PHP files.
    • We use "EOP" for end-of-paragraph markers instead of misleading "EOS" (MeCab).
    • Slightly changed how a connection is established with SQL. It makes messages more relevant when SQL is not running.
    • Not Japanese texts now always use the PHP parser. The SQL parser is no longer used.
  • JS: Some deprecated functions escape and unescape were replaced by modern equivalents encodeURIcomponent and decodeURIcomponent. This may lead to changes in cookies, notably making them work better.
  • DB: the NO_ZERO_DATE mode is no longer required, see #78.
    • In the words table, replaced the default timestamp 0000-00-00 00:00:00 by 0000-00-00 00:00:01.
    • The demo database underwent the same change.
  • Updated composer.lock.
  • Docker: more default options, documentation updated.

Deprecated

  • do_test_test_css in do_test_test.php is deprecated since it was causing display issues. Its CSS rules were trimmed.

Removed

  • The ability to use a dictionary with a specific encoding, introduced in 1.0.2, is being removed. It was making things overwhelmingly complex and caused issues, as signaled in #58. Adapted from PR #59.

Fixed

  • Docker:
    • Docker integration repaired (#37)! Huge thanks to @hakuro-jp for the initial help and @darkone23 for the final solution. Without you two I would have long given up with Docker.
    • Docker continuous integration is back as well due to a rewrite of the workflow.
  • Texts:
    • The audio player was no longer working since 2.1.0-fork since the play button was hidden.
    • Save text position (inc/ajax_save_text_position.php) was broken for all texts. This is fixed.
    • Right frames should hide automatically but they often don't #61. Merged PR #62.
    • Japanese parsing is now better, and uses PHP only (the local_infile SQL functionality is no longer used). Related to PR #43.
    • One-word not-Japanese texts do no longer result in a crash (#80), whoever uses them.
  • Tests:
    • Header was hidden during tests on Chrome-based browsers.
    • Testing specific terms was broken (#66) and tests were sometimes not counting score. Solution inspired from PR #67 from @jzohrab.
    • Sometimes tests were loop-reloading clicking after setting new status, this is fixed.
  • JS:
    • You should no longer see annoying console messages of "cClick" crashing on "obj is null".
  • PHP:
    • Type fixes thanks to psalm:
      • get_first_value documentation updated since it was also returning float and int.
      • get_similar_terms in simterms.php officially returns int.
    • Inconsistent option in inc/ajax_save_setting.php.
      • Since 2.2.2-fork, you had to use a GET request to use it, resulting in authorization errors.
      • POST requests are now again the default way to use it.
      • PHP tries to set the allow_local_infile option during the connection with SQL (#20, #40).
  • UI
    • Audio in edit_texts.php was never shown.
    • When adding text, the user was ask to create a media folder in ..., corrected to ...
  • DB:
    • For some users it was impossible to install the default database due to the use of a ZERO date (#78).
    • Deleted wrong database instructions ADD DROP INDEX TiTextLC altering temptextitems in update_database of database_connect.php.

Full Changelog

The scooping release

06 Nov 06:53
Compare
Choose a tag to compare

This release fixes an important bunch of various issues, many of them related to the database, words testing and the "I KNOW ALL" feature. I would like to address my special thanks to @jzohrab and @Heliozoa for they great support!

Added

  • Links to the Discord community (README.md and inc/kernel_utility.php).

Changed

  • Renamed connect_mamp.php to connect_mamp.inc.php for consistency with documentation.
  • "I KNOW ALL" button becomes "Set All to Known" and "IGNORE ALL" becomes "Ignore All".
  • Changed the messages when clicking "Set All to Known" or "Ignore All".
  • Uncomplete code linting in bulk_translate_words.php. For phone users, it now properly focuses on the main screen after use.
  • Only sentences containing more than 70% of known words are shown were testing sentences. Based on an idea from #53, with contribution of #65.

Fixed

  • Left-to-right languages where displayed as right-to-left when checking them, as signaled in pull request #42, thanks @Heliozoa!
  • People who didn't fill the URL for Google Translate were seeing deprecation warnings while using using the bulk_translate functionality (clicking in "TO DO" for editing multiple new words). Bulk translate itself is not fixed, but warnings are no longer displayed. Merged pull request #44, from @Heliozoa.
  • Multiple fixes to the "I Known All Words" feature. Great thanks to @jzohrab!
    • Setting all words to well-known was resulting in a crash when no words were added as well-known (all_words_wellknown.php).
    • Setting all words to well-known was resulting in a crash when multiple words had the same lowercase value. See issue #46!
    • Words were not updated in the view unless reparsing the text (#48). Merged pull request #49.
  • In the main dropdown menu, the option "Text-to-Speech Settings" was still leading to tts.php (now text_to_speech_settings.php). Merged pull request #51, thanks @jzohrab.
  • Database backup/restoration:
    • Fixed database backup, signaled in #55.
    • Fixed the database restoration, apparently broken since 2.0.3-fork. Pull request #56 by @jzohrab.
  • Sentences with unknown words were showed in test when it was not supposed to be the case (#52 and #64).

Full Changelog

Multi-words and terms upload

27 Sep 03:23
Compare
Choose a tag to compare

This release fixes an important bug preventing multi-words insertion for languages using spaces. You do no longer need to enable local_infile to use the terms import utility.

Changed

  • Refactored upload_words.php.

Fixed

  • Multi-words insertion for languages using no space is now repaired! Thanks to @gaoxiangluke for signaling it (#38).
  • Terms import (upload_words.php) can now be used with @@GLOBAL.local_infile (MySQL) set to 0, definitely closing #20.
  • Deleted a parasite ";" that was displayed after importing terms.

2.5.1: WordPress-friendly version

16 Sep 02:06
Compare
Choose a tag to compare

This version fixes two important issues for those using a web hoster such as WordPress. For the others, not much should change, but LWT is now easier to set up!

Fixed

  • Having @@GLOBAL.local_infile (MySQL) set to 0, or any configuration disabling LOAD DATA LOCAL INFILE, was causing a fatal error on adding a new text. This is fixing by a slower method.
    • If local_infile is enabled, no change should be noticed.
    • This was signaled in issues #20 and #40.
  • The WordPress binding scripts had multiple issues as reported in #41, thanks @Redmattski for all your time!