cmdx-i18n 0.2.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -1
  3. data/.ruby-version +1 -1
  4. data/CHANGELOG.md +12 -1
  5. data/README.md +49 -27
  6. data/lib/cmdx/i18n/railtie.rb +10 -25
  7. data/lib/cmdx/i18n/version.rb +4 -1
  8. data/lib/cmdx/i18n.rb +5 -18
  9. data/lib/generators/cmdx/i18n/locale_generator.rb +7 -19
  10. data/lib/locales/af.yml +12 -5
  11. data/lib/locales/ar.yml +12 -5
  12. data/lib/locales/az.yml +12 -5
  13. data/lib/locales/be.yml +12 -5
  14. data/lib/locales/bg.yml +12 -5
  15. data/lib/locales/bn.yml +12 -5
  16. data/lib/locales/bs.yml +12 -5
  17. data/lib/locales/ca.yml +12 -5
  18. data/lib/locales/cnr.yml +12 -5
  19. data/lib/locales/cs.yml +12 -5
  20. data/lib/locales/cy.yml +12 -5
  21. data/lib/locales/da.yml +12 -5
  22. data/lib/locales/de.yml +12 -5
  23. data/lib/locales/dz.yml +12 -5
  24. data/lib/locales/el.yml +12 -5
  25. data/lib/locales/en.yml +12 -5
  26. data/lib/locales/eo.yml +12 -5
  27. data/lib/locales/es.yml +12 -5
  28. data/lib/locales/et.yml +12 -5
  29. data/lib/locales/eu.yml +12 -5
  30. data/lib/locales/fa.yml +12 -5
  31. data/lib/locales/fi.yml +12 -5
  32. data/lib/locales/fr.yml +12 -5
  33. data/lib/locales/fy.yml +12 -5
  34. data/lib/locales/gd.yml +12 -5
  35. data/lib/locales/gl.yml +12 -5
  36. data/lib/locales/he.yml +12 -5
  37. data/lib/locales/hi.yml +12 -5
  38. data/lib/locales/hr.yml +12 -5
  39. data/lib/locales/hu.yml +12 -5
  40. data/lib/locales/hy.yml +12 -5
  41. data/lib/locales/id.yml +12 -5
  42. data/lib/locales/is.yml +12 -5
  43. data/lib/locales/it.yml +12 -5
  44. data/lib/locales/ja.yml +12 -5
  45. data/lib/locales/ka.yml +12 -5
  46. data/lib/locales/kk.yml +12 -5
  47. data/lib/locales/km.yml +12 -5
  48. data/lib/locales/kn.yml +12 -5
  49. data/lib/locales/ko.yml +12 -5
  50. data/lib/locales/lb.yml +12 -5
  51. data/lib/locales/lo.yml +12 -5
  52. data/lib/locales/lt.yml +12 -5
  53. data/lib/locales/lv.yml +12 -5
  54. data/lib/locales/mg.yml +12 -5
  55. data/lib/locales/mk.yml +12 -5
  56. data/lib/locales/ml.yml +12 -5
  57. data/lib/locales/mn.yml +12 -5
  58. data/lib/locales/mr-IN.yml +12 -5
  59. data/lib/locales/ms.yml +12 -5
  60. data/lib/locales/nb.yml +12 -5
  61. data/lib/locales/ne.yml +12 -5
  62. data/lib/locales/nl.yml +12 -5
  63. data/lib/locales/nn.yml +12 -5
  64. data/lib/locales/oc.yml +12 -5
  65. data/lib/locales/or.yml +12 -5
  66. data/lib/locales/pa.yml +12 -5
  67. data/lib/locales/pl.yml +12 -5
  68. data/lib/locales/pt.yml +12 -5
  69. data/lib/locales/rm.yml +12 -5
  70. data/lib/locales/ro.yml +12 -5
  71. data/lib/locales/ru.yml +12 -5
  72. data/lib/locales/sc.yml +12 -5
  73. data/lib/locales/sk.yml +12 -5
  74. data/lib/locales/sl.yml +12 -5
  75. data/lib/locales/sq.yml +12 -5
  76. data/lib/locales/sr.yml +12 -5
  77. data/lib/locales/st.yml +12 -5
  78. data/lib/locales/sv.yml +12 -5
  79. data/lib/locales/sw.yml +12 -5
  80. data/lib/locales/ta.yml +12 -5
  81. data/lib/locales/te.yml +12 -5
  82. data/lib/locales/th.yml +12 -5
  83. data/lib/locales/tl.yml +12 -5
  84. data/lib/locales/tr.yml +12 -5
  85. data/lib/locales/tt.yml +12 -5
  86. data/lib/locales/ug.yml +12 -5
  87. data/lib/locales/uk.yml +12 -5
  88. data/lib/locales/ur.yml +12 -5
  89. data/lib/locales/uz.yml +12 -5
  90. data/lib/locales/vi.yml +12 -5
  91. data/lib/locales/wo.yml +12 -5
  92. data/lib/locales/zh-CN.yml +12 -5
  93. data/lib/locales/zh-HK.yml +12 -5
  94. data/lib/locales/zh-TW.yml +12 -5
  95. data/lib/locales/zh-YUE.yml +12 -5
  96. data/src/cmdx-dark-logo.png +0 -0
  97. data/src/cmdx-light-logo.png +0 -0
  98. data/src/cmdx-logo.svg +1 -0
  99. metadata +8 -25
  100. data/.cursor/prompts/docs.md +0 -12
  101. data/.cursor/prompts/llms.md +0 -20
  102. data/.cursor/prompts/rspec.md +0 -24
  103. data/.cursor/prompts/yardoc.md +0 -14
  104. data/.cursor/rules/cursor-instructions.mdc +0 -61
  105. data/src/cmdx-i18n-logo.png +0 -0
@@ -1,15 +1,15 @@
1
1
  zh-YUE:
2
2
  cmdx:
3
3
  attributes:
4
- required: "必須可以通過來源存取"
5
- undefined: "委託畀未定義嘅方法 %{method}"
4
+ required: "係必要嘅"
6
5
  coercions:
7
6
  into_a: "無法強制轉換成 %{type}"
8
7
  into_an: "無法強制轉換成 %{type}"
9
8
  into_any: "無法強制轉換成其中一個:%{types}"
10
- unknown: "未知嘅 %{type} 強制轉換類型"
11
- faults:
12
- unspecified: "冇提供原因"
9
+ reasons:
10
+ unspecified: "未指定"
11
+ outputs:
12
+ missing: "必須喺上下文入面設定"
13
13
  types:
14
14
  array: "陣列"
15
15
  big_decimal: "大十進位"
@@ -25,6 +25,7 @@ zh-YUE:
25
25
  symbol: "符號"
26
26
  time: "時間"
27
27
  validators:
28
+ absence: "必須係空白"
28
29
  exclusion:
29
30
  of: "唔可以係其中一個:%{values}"
30
31
  within: "唔可以喺 %{min} 同 %{max} 之間"
@@ -37,6 +38,9 @@ zh-YUE:
37
38
  is_not: "長度唔可以係 %{is_not}"
38
39
  min: "長度至少必須係 %{min}"
39
40
  max: "長度最多可以係 %{max}"
41
+ gt: "長度必須大過 %{gt}"
42
+ lt: "長度必須細過 %{lt}"
43
+ nil_value: "必須有長度"
40
44
  not_within: "長度唔可以喺 %{min} 同 %{max} 之間"
41
45
  within: "長度必須喺 %{min} 同 %{max} 之間"
42
46
  numeric:
@@ -44,6 +48,9 @@ zh-YUE:
44
48
  is_not: "唔可以係 %{is_not}"
45
49
  min: "至少必須係 %{min}"
46
50
  max: "最多可以係 %{max}"
51
+ gt: "必須大過 %{gt}"
52
+ lt: "必須細過 %{lt}"
53
+ nil_value: "必須係數字"
47
54
  not_within: "唔可以喺 %{min} 同 %{max} 之間"
48
55
  within: "必須喺 %{min} 同 %{max} 之間"
49
56
  presence: "唔可以係空白"
Binary file
Binary file
data/src/cmdx-logo.svg ADDED
@@ -0,0 +1 @@
1
+ <svg width="352.2" height="112.266" viewBox="0 0 203 64.708" xmlns="http://www.w3.org/2000/svg" xmlSpace="preserve"><path d="M172.908 17.723 169.4 23.17 156.385 3.323h3.507l9.508 14.77 1.938-3.139L161.738 0h-11.446L169.4 29.262 188.046 0h-3.97L173 17.54zm-20.677 43.57h-3.139l18.646-29.447L147.431.093h-3.97l20.308 31.846L143 64.708l10.985-.092 39.138-61.2h3.323L174.57 37.754l13.662 21.415h3.969l-13.754-21.415L202.538.093H191.37zm29.63-23.262 15.047 23.262h-10.523l-13.662-20.77-15.508 24.093h3.97l11.63-18 11.723 18H203l-18.83-29.262-.278-.461z" fill="#fe1817"/><path d="M41.667 14v12.8h-23.42c-3.214.272-5.665 3.05-5.665 6.318s2.45 5.937 5.664 6.318H33.17v4.248H18.246a10.65 10.65 0 0 1-9.858-10.62c0-5.447 4.194-10.077 9.64-10.512h19.39v-4.303H18.246v.054A14.823 14.823 0 0 0 4.248 33.118c0 7.898 6.21 14.38 13.998 14.815h19.172v-8.497h4.249v12.745h-23.42A19.063 19.063 0 0 1 0 33.118a19.033 19.033 0 0 1 18.246-19.063zM75 35.623 87.2 14h13.508v38.181H87.963v-14.27l-8.116 14.27h-9.749L57.734 30.504v-8.007l14.87 25.436h4.792l14.815-25.436v25.436h4.249V18.249H89.65l-14.76 25.49-14.542-25.49H53.54v29.684h4.194v-8.007l4.249 7.299v4.956H49.292v-38.18H62.8zM108.333 14h23.42C141.94 14.436 150 22.824 150 33.064c0 10.294-8.061 18.681-18.246 19.117h-23.42V22.497h23.42a10.65 10.65 0 0 1 9.858 10.621c0 5.447-4.194 10.13-9.64 10.566H116.83V30.286h4.248v9.15l10.676-.054c3.213-.273 5.664-3.05 5.664-6.264 0-2.778-1.743-5.065-4.194-5.991-.926-.382-1.47-.382-2.94-.382h-17.702v21.188h19.172a14.84 14.84 0 0 0 13.998-14.87c0-7.897-6.21-14.379-13.998-14.814h-23.42z"/></svg>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cmdx-i18n
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez
@@ -15,28 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - ">="
17
17
  - !ruby/object:Gem::Version
18
- version: 1.5.1
18
+ version: 2.0.0
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - ">="
24
24
  - !ruby/object:Gem::Version
25
- version: 1.5.1
26
- - !ruby/object:Gem::Dependency
27
- name: zeitwerk
28
- requirement: !ruby/object:Gem::Requirement
29
- requirements:
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: '0'
33
- type: :runtime
34
- prerelease: false
35
- version_requirements: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - ">="
38
- - !ruby/object:Gem::Version
39
- version: '0'
25
+ version: 2.0.0
40
26
  - !ruby/object:Gem::Dependency
41
27
  name: bundler
42
28
  requirement: !ruby/object:Gem::Requirement
@@ -156,11 +142,6 @@ executables: []
156
142
  extensions: []
157
143
  extra_rdoc_files: []
158
144
  files:
159
- - ".cursor/prompts/docs.md"
160
- - ".cursor/prompts/llms.md"
161
- - ".cursor/prompts/rspec.md"
162
- - ".cursor/prompts/yardoc.md"
163
- - ".cursor/rules/cursor-instructions.mdc"
164
145
  - ".irbrc"
165
146
  - ".rspec"
166
147
  - ".rubocop.yml"
@@ -260,7 +241,9 @@ files:
260
241
  - lib/locales/zh-HK.yml
261
242
  - lib/locales/zh-TW.yml
262
243
  - lib/locales/zh-YUE.yml
263
- - src/cmdx-i18n-logo.png
244
+ - src/cmdx-dark-logo.png
245
+ - src/cmdx-light-logo.png
246
+ - src/cmdx-logo.svg
264
247
  homepage: https://github.com/drexed/cmdx-i18n
265
248
  licenses:
266
249
  - MIT
@@ -278,14 +261,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
278
261
  requirements:
279
262
  - - ">="
280
263
  - !ruby/object:Gem::Version
281
- version: 3.1.0
264
+ version: 3.3.0
282
265
  required_rubygems_version: !ruby/object:Gem::Requirement
283
266
  requirements:
284
267
  - - ">="
285
268
  - !ruby/object:Gem::Version
286
269
  version: '0'
287
270
  requirements: []
288
- rubygems_version: 3.7.1
271
+ rubygems_version: 4.0.10
289
272
  specification_version: 4
290
273
  summary: I18n translations and localization for CMDx.
291
274
  test_files: []
@@ -1,12 +0,0 @@
1
- You are a senior Ruby developer with expert knowledge of CMDx and writing documentation.
2
-
3
- Update the active tab using the following guidelines:
4
-
5
- - Follow best practices and implementation
6
- - Use a consistent professional voice
7
- - Examples should be concise, non-repetitive, and realistic
8
- - Update any pre-existing documentation to match stated rules
9
- - Examples should not cross boundaries or focus
10
- - Docs must cover both typical use cases, including invalid inputs and error conditions
11
- - Use GitHub flavored markdown, including alerts to emphasize critical information (https://github.com/orgs/community/discussions/16925)
12
- - Optimize for LLM's including coding and AI agents
@@ -1,20 +0,0 @@
1
- Process the following instructions in the order given:
2
-
3
- 1. Create an `LLM.md` file
4
- 2. Append all files within `docs/**/*.md` into @LLM.md
5
- 2a. Use order outlined in the table of contents of @README.md
6
- 2b. Process one file at a time faster performance and improved accuracy
7
- 2c. Remove the table of contents from the chunk
8
- 2c. Remove the navigations below `---` from the chunk
9
- 2d. Wrap the chunk the files GitHub url the top and a spacer at the bottom like so:
10
- ```
11
-
12
- ---
13
- url: https://github.com/drexed/cmdx/blob/main/docs/callbacks.md
14
- ---
15
-
16
- {{ chunk }}
17
-
18
- ---
19
-
20
- ```
@@ -1,24 +0,0 @@
1
- You are a senior Ruby developer with expert knowledge of RSpec.
2
-
3
- Add tests for the active tab using the following guidelines:
4
-
5
- - Expectations should be concise, non-repetitive, and realistic (how it would be used in the real world)
6
- - Follow best practices and implementation
7
- - Update any pre-existing specs to match stated rules
8
- - New tests should be consistent with current `spec/cmdx` specs
9
- - Use custom matchers available within `lib/cmdx/rspec`
10
- - Use task helpers available within `spec/support/helpers`
11
- - Use stubs to return predefined values for specific methods. Isolate the unit being tested, but avoid over-mocking; test real behavior when possible (mocks should be used only when necessary)
12
- - Ensure each test is independent; avoid shared state between tests
13
- - Use let and let! to define test data, ensuring minimal and necessary setup
14
- - Context block descriptions should start with the following words: `when`, `with`, `without`
15
- - Organize tests logically using describe for classes/modules and context for different scenarios
16
- - Use subject to define the object under test when appropriate to avoid repetition
17
- - Ensure test file paths mirror the structure of the files being tested, but within the spec directory (e.g., lib/cmdx/task.rb → spec/cmdx/task_spec.rb)
18
- - Use clear and descriptive names for describe, context, and it blocks
19
- - Prefer the expect syntax for assertions to improve readability
20
- - Keep test code concise; avoid unnecessary complexity or duplication
21
- - Tests must cover both typical cases and edge cases, including invalid inputs and error conditions
22
- - Consider all possible scenarios for each method or behavior and ensure they are tested
23
- - Do NOT include integration or real world examples
24
- - Verify all specs are passing
@@ -1,14 +0,0 @@
1
- You are a senior Ruby developer with expert knowledge of YARDoc.
2
-
3
- Add yardoc to the active tab using the following guidelines:
4
-
5
- - Follow best practices and implementation
6
- - New documentation should be consistent with current `lib/cmdx` documentation
7
- - Examples should be concise, non-repetitive, and realistic
8
- - Avoid unnecessary complexity or duplication
9
- - Update any pre-existing documentation to match stated rules
10
- - Do NOT include `CMDx` module level docs
11
- - Module level docs description should NOT include `@example`
12
- - Method level docs should include `@example`, `param`, `@options`, `@return`, and any `@raise`
13
- - Hash `@params` should expand with possible `@option`
14
- - Module and method level docs should NOT include `@since`
@@ -1,61 +0,0 @@
1
- ---
2
- description:
3
- globs:
4
- alwaysApply: true
5
- ---
6
-
7
- # Ruby Coding Standards
8
-
9
- Follow the official Ruby gem guides for best practices.
10
- Reference the guides outlined in https://guides.rubygems.org
11
-
12
- ## Project Context
13
- CMDx::I18n is a collection of localized translations for the CMDx framework.
14
- Reference the CMDx documentation in https://github.com/drexed/cmdx/blob/main/LLM.md
15
-
16
- ## Technology Stack
17
- - Ruby 3.4+
18
- - RSpec 3.1+
19
- - CMDx 1.6+
20
-
21
- ## Code Style and Structure
22
- - Write concise, idiomatic Ruby code with accurate examples
23
- - Follow Ruby conventions and best practices
24
- - Use object-oriented and functional programming patterns as appropriate
25
- - Prefer iteration and modularization over code duplication
26
- - Use descriptive variable and method names (e.g., user_signed_in?, calculate_total)
27
- - Write comprehensive code documentation using the Yardoc format
28
-
29
- ## Naming Conventions
30
- - Use snake_case for file names, method names, and variables
31
- - Use CamelCase for class and module names
32
-
33
- ## Syntax and Formatting
34
- - Follow the Ruby Style Guide (https://rubystyle.guide/)
35
- - Follow Ruby style conventions (2-space indentation, snake_case methods)
36
- - Use Ruby's expressive syntax (e.g., unless, ||=, &.)
37
- - Prefer double quotes for strings
38
- - Respect my Rubocop options
39
-
40
- ## Performance Optimization
41
- - Use memoization for expensive operations
42
-
43
- ## Testing
44
- - Follow the RSpec Style Guide (https://rspec.rubystyle.guide/)
45
- - Write comprehensive tests using RSpec
46
- - It's ok to put multiple assertions in the same example
47
- - Include both BDD and TDD based tests
48
- - Create test objects to share across tests
49
- - Do NOT make tests for obvious or reflective expectations
50
- - Prefer real objects over mocks. Use `instance_double` if necessary; never `double`
51
- - Don't test declarative configuration
52
- - Use appropriate matchers
53
- - Update tests and update Yardocs after you write code
54
-
55
- ## Documentation
56
- - Utilize the YARDoc format when documenting Ruby code
57
- - Follow these best practices:
58
- - Avoid redundant comments that merely restate the code
59
- - Keep comments up-to-date with code changes
60
- - Keep documentation consistent
61
- - Update CHANGELOG.md with any changes
Binary file