2.9.0: RESTful and fixes #162
HugoFara
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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
andtargetLangFromDict
are now officially going to thekernel utility functions.
short text creation/edition, long text creation and text check
(Change textbox language according to selected language #111).
Text
(ininc/classes/Text.php
).edit_texts_form
(inedit_texts.php
) that takes a Text object as input.api.php
is intended to continue developing itselfas a REST API. It features the following interaction:
/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./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
: changeaudio
position./reading-position
: change the reading position.actually changed.
$socket
inconnect.inc.php
. This feature was brought to you by@hangug-eo in his PR
Fixes the password handling in the wizard and allow access to the db via unix sockets #132.
text_to_speech_settings.php
.server_data.php
was reorganized and is more informative with detailsabout the REST API.
Changed
flex-spaced
now sets the property oftext-align: center;
. This property was inherited before.Ti2Order
(intextitems2
). It makes management easier, but users may need to reload the annotations once.Fixed
the intended page. Same goes for "New Text" on "Archived Texts" page.
settings.php
was sometimes displayed (Misc. warnings #121).info.php
instead ofdocs/info.html
). Signaled by Mooncake on Discord.text_to_speech_settings.php
).trim
was sent in simterms when no similar term was found.media_uri
property ofText
was used instead ofsource
. Thanks to @hangug-eo for his PR Use the source url to fill the Source URI form field #133!character as a word (e. g.: Chinese). Big thanks to @hangug-eo for signaling the issue and solving it in his PR chars are not space separated in the SeText column #140!
@hangug-eo in Fixes the password handling in the wizard and allow access to the db via unix sockets #132.
text annotation edition.
Deprecated
api.php
):inc/ajax_show_similar_terms.php
, use/similar-terms
on GET,simterms_lgid
becomeslg_id
andsimterms_word
term
.inc/ajax_add_term_transl.php
/terms/new
.lang
becomeslg_id
,text
isterm_text
./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
. Argumentdata
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
. Argumentfilepath
is nowpath
.inc/ajax_save_setting.php
should be accessed through/settings
,k
becomeskey
andv
value
.inc/ajax_save_text_position.php
should be accessed through/texts/{text-id}/reading-position
,tposition
is nowposition
.inc/ajax_word_counts.php
should be accessed through/texts/statistics
, on GET. Argumentid
is nowtexts_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. Argumentlang
is nowlg_id
,word
isword_lc
andwoid
isword_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
:word=""
is now deprecated as the page loads in pure PHP./terms/{term-id}/translations
,id
is nowtext_id
andword
becomestext_lc
.Security
Full Changelog
This discussion was created from the release 2.9.0: RESTful and fixes.
Beta Was this translation helpful? Give feedback.
All reactions