Caleb Heuer
87c2676a33
Diagnostic fixes
2024-10-25 15:43:36 -06:00
Caleb Heuer
2e58ad218d
Move custom types under the flib
namespace
2024-10-09 20:35:00 -06:00
Caleb Heuer
feb79d6059
Remove deprecated modules and rename lite modules
2024-09-17 20:18:54 -06:00
Caleb Heuer
ea256547dd
Rename global to storage
2024-09-17 20:08:50 -06:00
Caleb Heuer
85ed0a99fb
Update require syntax and add require guards
2024-01-06 12:47:09 -07:00
Caleb Heuer
e10546e0e7
Fix a zillion language server warnings
2023-12-19 20:53:39 -07:00
Caleb Heuer
a4065e404d
Add dictionary-lite module
2022-12-03 21:10:57 -07:00
Caleb Heuer
6152644531
Fix translations getting stuck in 1.1.73+
...
The translation event was changed to return a failure if any substring
returned an unknown key. This broke the dictionary system because any
batched translation would fail if any of the substrings failed. Work
around this by using the new fallback strings API to avoid failures.
2022-12-02 13:28:02 -07:00
Caleb Heuer
017a3be41c
Use gui-lite for dictionary module
2022-12-02 00:04:45 -07:00
Caleb Heuer
428193a1fe
Add class annotations to all modules
2022-12-01 23:47:47 -07:00
Caleb Heuer
21a863083e
Switch to slash requires
2022-11-17 13:02:59 -07:00
Caleb Heuer
3c8c97602c
Fix type definitions and use generics
2022-11-14 20:02:09 -07:00
Caleb Heuer
f73d81ad6b
Fix crash when canceling translations for certain players
...
Thanks to an incorrect if condition, if ANY player left the game, they
would try to hand off translation duties to the next player, even if
they were not actively translating.
Fixes: https://github.com/factoriolib/flib/issues/46
2022-09-18 12:18:33 -06:00
Caleb Heuer
44cacc456d
Various type fixes
2022-09-17 15:38:45 -06:00
Caleb Heuer
d9d1f5b944
Add explanation tooltip to header of dictionary GUI
2022-09-12 23:53:23 -06:00
Caleb Heuer
3692138731
Fix translations getting stuck sometimes
...
The code for parsing the locale identifier did not abort if the player
data already existed, causing the player to get added to the players
list in the language data multiple times. If the translating player
left, and had a duplicate in the players array, then they would get put
into the "waiting" state, but no other player would become the
translator. Hence, the translations would get permanently stuck.
2022-09-12 23:17:10 -06:00
Caleb Heuer
80380fd46c
Fix separator ambiguity with an empty translation
2022-07-21 21:19:31 -06:00
Caleb Heuer
5087561b5e
Add translation progress GUI
2022-07-20 23:06:03 -06:00
Caleb Heuer
fe58c74bfb
Apply stylua to all files
2022-07-20 21:21:43 -06:00
Caleb Heuer
924a4a0c8f
Micro
2022-07-08 12:03:03 -06:00
Caleb Heuer
92633dcf32
Remove localised string nesting from the dictionary module.
...
This makes translations take significantly longer, but fixes network
saturation issues with slow internet connections.
Fixes: https://github.com/factoriolib/flib/issues/45
2022-07-08 11:41:30 -06:00
raiguard
ac9724fe4b
Use present tense
2022-02-23 19:13:12 -07:00
raiguard
f0d116d43e
Micro
2022-02-23 16:10:04 -07:00
raiguard
49fcb670cf
Correctly type RawDictionary
2022-02-15 20:06:34 -07:00
raiguard
9c3cc13435
Format all files with stylua
2022-02-15 20:04:24 -07:00
raiguard
fb8633dd82
Convert dictionary module to EmmyLua
2022-02-15 20:02:33 -07:00
Richard Clamp
1e19712af1
Dictionary: fix modules with hyphens in thier names ( #37 )
2021-11-20 09:44:19 -07:00
raiguard
b39a8f2b33
Fix dictionary module cross-talk with multiple mods
2021-11-17 22:29:27 -07:00
raiguard
5ac61b0c89
Add missing nil check
2021-11-15 18:34:29 -07:00
raiguard
82928fe88e
Add dictionary levels setting
2021-09-19 15:21:07 -06:00
raiguard
49528bd65a
Micro
2021-08-09 23:38:50 -06:00
raiguard
e7f111c699
Handle locale-identifier translation getting lost
2021-08-09 23:01:45 -06:00
raiguard
0a1bf1d8ae
I'm a doofus
2021-08-09 22:40:49 -06:00
raiguard
3b7b071b36
Fix process_translation docs
2021-08-09 22:39:36 -06:00
raiguard
6c5661db1c
Don't return dictionaries in an event
2021-08-08 19:59:44 -06:00
raiguard
d546f84e07
Add dictionary module docs and example
2021-08-08 15:53:50 -06:00
raiguard
ce02aaae58
Add the capability to not store raw dictionaries in global
2021-08-04 18:26:31 -06:00
raiguard
2984a16bc6
Fix strings not being added at the end of a level or beginning of a new string
2021-08-04 18:26:10 -06:00
raiguard
71c3736f1e
Increase timeout, fix player tables not being cleaned up
2021-08-04 17:23:28 -06:00
raiguard
898d54a5d4
Fix a dumb-dumb mistake
2021-08-04 16:09:13 -06:00
raiguard
015d381885
Handle when a player leaves mid-translation, cleanup
2021-08-04 15:46:43 -06:00
raiguard
5875c49106
Solve edge case with singleplayer save/load
2021-08-04 15:25:09 -06:00
raiguard
29e439777f
Cleanup and consolidation
2021-08-03 23:42:21 -06:00
raiguard
7a359248b8
Raise event when finished translating
2021-08-03 23:23:28 -06:00
raiguard
afb05d900e
Fix error in player table generation
2021-08-03 23:23:02 -06:00
raiguard
cf5c2f5251
A larger max depth actually works wonderfully
2021-08-03 23:22:53 -06:00
raiguard
b0bea85002
Translate and add to in process dictionaries
2021-08-03 22:51:15 -06:00
raiguard
ed8cad7262
More groundwork for actually doing translations
2021-08-03 22:33:21 -06:00
raiguard
319bc10751
Write the translation handling logic sans language detection
2021-08-03 21:53:58 -06:00
raiguard
b15d57ce63
Add init function, max_levels variable, reduce to 5
2021-08-01 17:11:05 -06:00