Tags: ProgramComputer/lwt
Tags
Fixes several small issues, you should see more multi-words in partic… …ular. [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 [HugoFara#70](HugoFara#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.
Better responsive design for forms and various bugs crunching. [Added] * Responsive design: LWT gets easier to visualize on phone! [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 [HugoFara#100](HugoFara#100). Thanks [@maanh96](https://github.com/maanh96) for the hint! * Docker: ``media/`` was neither accessible nor saved to a container ([HugoFara#106](HugoFara#106)). Thanks to [@parradam](https://github.com/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 [HugoFara#103](HugoFara#103). * Expressions containing word feature repaired! [HugoFara#90](HugoFara#90). * On text-to-speech settings, the region was often not displayed. [Full Changelog] * [2.7.0...2.8.0](HugoFara/lwt@2.7.0...2.8.0)
This release brings massive improvements, such as auto-translation an… …d responsive design. [Added] * The translation and romanization of new words can now be automatic. * Supported automatic translation is achieved using [LibreTranslate](https://libretranslate.com/). * Romanization using [MeCab](https://taku910.github.io/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](https://github.com/99MengXin) for the link ([HugoFara#94](HugoFara#94 (comment))). * LibreTranslate integration. * TTS issues, as suggested by [@asdrubalivan](https://github.com/asdrubalivan) in [HugoFara#85](HugoFara#85 (comment)). [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](http://briancherne.github.io/jquery-hoverIntent/) 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 [HugoFara#78](HugoFara#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 HugoFara#80](HugoFara#80 (comment)) * 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 ([HugoFara#89](HugoFara#89)). * For Japanese: multi-words indicator was before each character, this is fixed [HugoFara#96](HugoFara#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".
[2.6.0-fork (January 01 2023)] Quite a huge release containing many different elements. [Added] * Frames resizing is back! The text reading and test interfaces updated in several ways. Based on several suggestions such as [HugoFara#60](HugoFara#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 [HugoFara#71](HugoFara#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 [HugoFara#78](HugoFara#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 [HugoFara#58](HugoFara#58). Adapted from PR [HugoFara#59](HugoFara#59). [Fixed] * Docker: * Docker integration repaired ([HugoFara#37](HugoFara#37))! Huge thanks to [@hakuro-jp](https://github.com/hakuro-jp) for the initial help and [@darkone23](https://github.com/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 ([HugoFara#61](HugoFara#61)). Merged PR (HugoFara#62)[HugoFara#62]. * Japanese parsing is now better, and uses PHP only (the local_infile SQL functionality is no longer used). Related to PR (HugoFara#43)[HugoFara#43]. * One-word not Japanese texts do no longer result in a crash ([HugoFara#80](HugoFara#80)), whoever uses them. * Tests: * Header was hidden during tests on Chrome-based browsers. * Testing specific terms was broken ([HugoFara#66](HugoFara#66)) and tests were sometimes not counting score. Solution inspired from PR [HugoFara#67](HugoFara#67) from [@jzohrab](https://github.com/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 ([HugoFara#20](HugoFara#20), [HugoFara#40](HugoFara#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 ([HugoFara#78](HugoFara#78)). * Deleted wrong database instructions ``ADD DROP INDEX TiTextLC`` altering ``temptextitems`` in ``update_database`` of ``database_connect.php``. [Full Changelog] * [2.5.3...2.6.0](HugoFara/lwt@2.5.3...2.6.0)
This release fixes an important amount of various bugs, notably relat… …ed to the database. Great thanks to [@jzohrab](https://github.com/jzohrab) and [@Heliozoa](https://github.com/Heliozoa)! [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 [HugoFara#53](HugoFara#53). [Fixed] * Left-to-right languages where displayed as right-to-left when checking them, as signaled in [pull request HugoFara#42](HugoFara#42), thanks [@helioza](https://github.com/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 HugoFara#44](HugoFara#44), from [@helioza](https://github.com/Heliozoa). * Multiple fixes to the "I Known All Words" feature. Great thanks to [@jzohrab](https://github.com/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 [HugoFara#46](HugoFara#46)! * Words were not updated in the view unless reparsing the text ([HugoFara#48](HugoFara#48)). Merged pull request [HugoFara#49](HugoFara#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 [HugoFara#51](HugoFara#51), thanks [@jzohrab](https://github.com/jzohrab). * Database backup/restoration: * Fixed database backup, signaled in [HugoFara#55](HugoFara#55). * Fixed the database restoration, apparently broken since 2.0.3-fork. Pull request [HugoFara#56](HugoFara#56) by [@jzohrab](https://github.com/jzohrab). * Sentences with unknown words were showed in test when it was not supposed to be the case ([HugoFara#52](HugoFara#52), [HugoFara#64](HugoFara#64) and PR [HugoFara#65](HugoFara#65)). [Full Changelog] * [2.5.2...2.5.3](HugoFara/lwt@2.5.2...2.5.3)
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](https://github.com/gaoxiangluke) for signaling it ([HugoFara#38](HugoFara#38)). * Terms import (``upload_words.php``) can now be used with ``@@GLOBAL.local_infile`` (MySQL) set to 0. * Deleted a parasite ";" that was displayed after importing terms.
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 [HugoFara#20](HugoFara#20) and [HugoFara#40](HugoFara#40). * The WordPress binding scripts had multiple issues as reported in [HugoFara#41](HugoFara#41), thanks [@Redmattski](https://github.com/Redmattski) for all your time!
This release brings compatibility with PHP 8.1+ and makes multi-words a thing again. This is an important release since it may be the last one solving issues with the merging of the official and the community versions of LWT. [Added] * Compatibility with PHP 8+! * Updated with LWT 2.0.3, solving incompatibilities with PHP 8.1 throwing MySQLI errors. * Introducing the new class ``Term`` in ``edit_mword.php``. This class is yet to be considered experimental, so expect important changes, but should gradually get used everywhere. * ``insert_expression_from_mecab`` in ``session_utility.php``. Better name and behavior for ``insertExpressionFromMeCab`` (see deprecations). [Changed] * Composer dependencies updated. * The Docker container now uses PHP 8.1 (instead of 7.4). [Fixed] * For some user, the --secure-priv-file option was still required to be on. This was due to a conflict between PHP and MySQLI authorizations. * When deleting a word, it was previously necessary to reload the page to see a visual change. * Multi-words insertion fixed (HugoFara#21). Many thanks to @chaosarium and @Kit1205 for your help with this long, long issue! * "Show Sentences" button during words edition was broken since 2.3.0-fork. [Full Changelog] * [2.4.1...2.5.0](HugoFara/lwt@2.4.1...2.5.0)
This regular bug fixing version crushes different bugs, especially fo… …r texts imports and text statistics. Hope things will run smoother! [Changed] * Some function signature were not logical in ``edit_texts.php``. These signatures remain untouched for backward compatibility, but the internals were changed. * Texts without tag do no longer display a "[]" string next to the title. Applies to both archived and active texts. [Fixed] * A typo was breaking the feeds count in ``edit_languages.php``, creating annoying notices as illustrated at [HugoFara#35](HugoFara#35). * The error "[1290] The MySQL server is running with the --secure-file-priv option" should no longer appear when trying to save Japanese texts. It was referenced [here](HugoFara#34 (comment)) in [issue HugoFara#34](HugoFara#34). * The "Undefined index: trans in .../bulk_translate_word.php" notice fixed. * The "Undefined index: WoText in .../delete_word.php" notice fixed. * Repaired ``long_text_import.php`` for non-Japanese texts, it was broken since 2.4.0. Thanks to [@rc-ops](https://github.com/rc-ops) for this issue [HugoFara#33](HugoFara#33). * Text statistics were not displayed when there was more than one text since 2.2.2-fork. [Full Changelog] * [2.4.0...2.4.1](HugoFara/lwt@2.4.0...2.4.1)
PreviousNext