Commit Graph

69 Commits

Author SHA1 Message Date
Jeroen van Rijn
d7bfbe0552 Port testing\core\text\i18n 2024-06-02 14:47:08 -04:00
Håkon Stormo
4328562e2c Satisfy -vet 2024-05-23 23:50:26 +02:00
Håkon Stormo
d3bbe29faa text_edit: better handle failure to resize underlying buffer 2024-05-23 23:28:39 +02:00
Jeroen van Rijn
f8c4ee3d3c i18n: Add section merge + duplicate key detection to gettext. 2024-05-17 15:50:37 +02:00
Jeroen van Rijn
6139da3d41 Fix .mo contexts
Fixes #3590

- `get("key")`
- `get("context", "key")`
2024-05-17 14:15:56 +02:00
Jeroen van Rijn
5a76b3c7c5 Fix .mo parser: Number of plurals
Fixes #3591

Added plur.mo to tests
2024-05-17 12:00:20 +02:00
gingerBill
efae99971b Fix missing _ = 2024-04-27 09:19:50 +01:00
gingerBill
4454849252 Add attributes to procedures in text/scanner 2024-04-27 09:16:36 +01:00
Maurizio M. Gavioli
ec7e75a57f Fix #3451 - core:text/i18n default number value in get_*_section proc.
In the to procs `get_single_section()` and `get_by_section()` the `number` parameter should have a default of `1` rather than `0`.

See the issue for more details.
2024-04-19 08:23:28 +02:00
gingerBill
76229cabfa Fix typo 2024-04-15 15:44:03 +01:00
gingerBill
69db9c6390 Add loads of nil checks when doing s.builder 2024-04-15 15:40:32 +01:00
Maurizio M. Gavioli
a0cff82320 Fix the format of some doc.odin files of the core library which did not made into the documentation.
`c/frontend/tokenizer`:
   add proper "Example:" header to demo example code,
   removed empty lines.
`container/bit_array`:
   moved comment before package;
   aligned narrative lines to left margin;
   converted case lines into bulleted lines ("- ");
   converted individual examples to single-tab-indented preformatted text.
`dynlib`:
   removed "//+build ignore" line;
   added newline at EOF.
`image/netpmb`:
   converted indented lines of "Reading", "Wrting" and "Some syntax..." into bulleted lists;
   "Formats" indented lines kept as they are as the preformatted text seems relevant to keep the alignments;
   doubly indented lines kept as single-indented to keep them different (as the format does not allow for two-level bulleted lists);
   removed empy lines.
`os/os2`:	WIP, not modified
`sys/info`:
   removed "//+build ignore" line;
   converted tab-indented initial description into regular left-margin comment;
   moved uncommented sample code within the doc comment as an "Example:";
   moved simple- and double-tabbed separate comments with sample Windows and macOS outputs within the doc comment as bulleted headlines with preformatted output listings;
   removed now empty comments and blank lines after the package line.
`text/i18n`:
   removed "//+build ignore" line;
   moved the pacakge line at the end;
   de-indented the tab-indented introductory narrative;
   moved sample code comments into the doc comment as tab-indented code with a proper "Example:" heading;
   removed "```" MD attempts at code formatting.
`text/table`:
   unindented the comment lines of a descriptive kind;
   headlines of major subdivisions are marked as bold;
   kept code samples as tab-indented preformatted text (as there are several of them, the standard "Example:" and "Output:" headings cannot be used) removing the "```" MD attempts at code formatting;
   removed in-between blank lines.
2024-04-14 17:18:08 +02:00
Laytan Laats
3a0df80066 correct newly found vets 2024-04-03 00:52:58 +02:00
gingerBill
3e7e779abf Replace core:* to base:* where appropriate 2024-01-28 22:18:51 +00:00
Michael Kutowski
3d90e580c5 check to see if s.builder is nil 2023-11-23 00:04:06 +01:00
Michael Kutowski
f635d3d8af forgot to use the old package name 2023-11-23 00:02:48 +01:00
Michael Kutowski
29f1b79d70 Add setup_once and clear_all, tidy up old code and add a few comments 2023-11-22 23:56:58 +01:00
gingerBill
b9cc2606f2 Remove default value 2023-09-30 20:26:52 +01:00
gingerBill
5023313c03 Minor cleanups to the core library 2023-09-30 20:26:04 +01:00
gingerBill
14adcb9db8 Use or_break and or_continue where appropriate in the core library 2023-09-30 15:34:39 +01:00
gingerBill
49ab935ae9 Disallow for in in favour of for _ in 2023-08-08 14:56:12 +01:00
Jeroen van Rijn
683ee75703 Fix #2684 2023-07-28 15:53:39 +02:00
gingerBill
3dec55f009 Replace x in &y Use &v in y syntax through core & vendor for switch/for statements 2023-06-26 15:42:57 +01:00
gingerBill
9b54b99bf6 Use positional and named arguments within the core library 2023-06-21 01:17:05 +01:00
gingerBill
9b15bda055 Add missing packages to examples/all 2023-06-07 22:48:39 +01:00
gingerBill
635842b322 Add more text packages to examples/all 2023-06-07 22:40:46 +01:00
Clay Murray
02eab95dd1 Fix check for continuation byte in core/text/text_edit 2023-05-02 14:14:24 -06:00
oskarnp
8862f9118b Fix typos in doc 2023-03-27 09:31:24 +02:00
oskarnp
e2e98672bd Fix typo 2023-03-26 21:51:57 +02:00
oskarnp
51f295cacc Rename init procs 2023-03-26 21:46:36 +02:00
oskarnp
0c50ac3396 Remove unnecessary #partial switch 2023-03-26 21:45:37 +02:00
oskarnp
2da81a4a26 Remove unnecessary C style loop 2023-03-26 21:44:31 +02:00
oskarnp
b6d4853a33 Fix cell alignment to default to Left using ZII 2023-03-26 21:41:16 +02:00
oskarnp
020b147222 Move helper procs into utility.odin 2023-03-26 21:33:27 +02:00
oskarnp
88ee5d1a6d text/table: Initial implementation 2023-03-26 16:10:27 +02:00
skytrias
63a0395a79 refactor SPECIALS_TABLE 2022-12-21 22:08:03 +01:00
skytrias
94af3c2887 package name changed 2022-12-21 21:38:21 +01:00
skytrias
e5d0417a6c folder name changed 2022-12-21 21:36:50 +01:00
skytrias
1bea0f3772 fix styling issues and use switches in cases its necessary, add comments to helpers 2022-12-20 15:48:10 +01:00
skytrias
ff7f139fd7 add iter_index and update tests to use easier matcher setup 2022-12-20 12:59:32 +01:00
skytrias
967afd8bbb try helper procedures / structs 2022-12-18 23:11:23 +01:00
skytrias
0ae1812f90 small fixes and oob checks, stop infinite loops on empty matches 2022-12-18 23:11:23 +01:00
skytrias
eb5523d5d3 case insensitive helper call 2022-12-18 23:11:23 +01:00
skytrias
3f4bbbec29 add proper unicode walking 2022-12-18 23:11:23 +01:00
skytrias
70bd220f34 balanced string, frontier pattern, gsub_with and their tests added 2022-12-18 23:11:23 +01:00
skytrias
bd3596f012 create lua strlib text package and tests 2022-12-18 23:11:23 +01:00
gingerBill
2ed16240a7 Add core:text/edit 2022-11-04 14:08:19 +00:00
gingerBill
b743f56fb9 Fix +build ignore 2022-11-04 11:39:54 +00:00
gingerBill
cde002c579 Fix i18n 2022-08-08 12:27:23 +01:00
gingerBill
33895b6d92 Convert all uses of *_from_slice to *_from_bytes where appropriate 2022-05-16 01:43:43 +01:00