transliterate

Transliteration engine
git clone git://lumidify.org/transliterate.git
Log | Files | Refs | README | LICENSE

commit 103e3fb6c16c4681a3553959349e7888d77961f6
parent b6ca2498b1dd64c821646d9462d377a5ab158de4
Author: lumidify <nobody@lumidify.org>
Date:   Wed,  1 Apr 2020 17:29:46 +0200

Document revert option

Diffstat:
Mtransliterate.pl | 20+++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/transliterate.pl b/transliterate.pl @@ -1756,7 +1756,7 @@ Sets the file of words to ignore. This has to be set even if the file is just empty because the user can add words to it from the unknown word window. -=item B<table> <table identifier> <filename> [nodisplay] +=item B<table> <table identifier> <filename> [nodisplay] [revert] Load the table from C<< <filename> >>, making it available for later use in the B<expand> and B<replace> commands using the identifier C<< <table identifier> >>. @@ -1766,17 +1766,27 @@ L<unknown word window|/"UNKNOWN WORD WINDOW">. If, however, the same filename is loaded again for another table that does not have B<nodisplay> set, it is still displayed. +If B<revert> is set, the original and replacement words are switched. This can +be useful for creating a config for transliterating in the opposite direction +with the same database. + Note that if C<< <filename> >> is not an absolute path, it is taken to be relative to the location of the configuration file. The table files simply consist of B<tablesep>-separated values, with the word in the -original script first and the replacement word second. The replacement word -can optionally have several parts separated by B<choicesep>, which will cause the -user to be prompted to choose one of the options. +original script first and the replacement word second. Both the original and +replacement word can optionally have several parts separated by B<choicesep>. If the +original word has multiple parts, it is separated and each of the parts is added +to the table with the replacement. If the replacement has multiple parts, the user +will be prompted to choose one of the options during the transliteration process. If, for whatever reason, the same table is needed twice, but with different endings, the table can simply be loaded twice with different IDs. If the same path is loaded, -the table that has already been loaded will be reused. +the table that has already been loaded will be reused. Note that this feature was +added before adding C<revert>, so the old table is used even if it had C<revert> +set and the new one doesn't. This is technically a problem, but I don't know of +any real-world case where it would be a problem, so I'm too lazy to change it. +Tell me if it actually becomes a problem for you. =item B<expand> <table identifier> <word ending table> [noroot]