소스 검색

Merge pull request #3452 from mgavioli/Fix_i18n_get-section_number_default

Fix #3451 - `core:text/i18n` default `number` value in `get_*_section`
Jeroen van Rijn 1 년 전
부모
커밋
1b143b9fa3
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      core/text/i18n/i18n.odin

+ 2 - 2
core/text/i18n/i18n.odin

@@ -90,7 +90,7 @@ DEFAULT_PARSE_OPTIONS :: Parse_Options{
 	- get(key, number), which returns the appropriate plural from the active catalog, or
 	- get(key, number, catalog) to grab text from a specific one.
 */
-get_single_section :: proc(key: string, number := 0, catalog: ^Translation = ACTIVE) -> (value: string) {
+get_single_section :: proc(key: string, number := 1, catalog: ^Translation = ACTIVE) -> (value: string) {
 	/*
 		A lot of languages use singular for 1 item and plural for 0 or more than 1 items. This is our default pluralize rule.
 	*/
@@ -108,7 +108,7 @@ get_single_section :: proc(key: string, number := 0, catalog: ^Translation = ACT
 	- get(section, key, number), which returns the appropriate plural from the active catalog, or
 	- get(section, key, number, catalog) to grab text from a specific one.
 */
-get_by_section :: proc(section, key: string, number := 0, catalog: ^Translation = ACTIVE) -> (value: string) {
+get_by_section :: proc(section, key: string, number := 1, catalog: ^Translation = ACTIVE) -> (value: string) {
 	/*
 		A lot of languages use singular for 1 item and plural for 0 or more than 1 items. This is our default pluralize rule.
 	*/