cmdx-i18n 0.3.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.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/.ruby-version +1 -1
- data/CHANGELOG.md +7 -1
- data/README.md +48 -28
- data/lib/cmdx/i18n/railtie.rb +10 -25
- data/lib/cmdx/i18n/version.rb +4 -1
- data/lib/cmdx/i18n.rb +4 -12
- data/lib/generators/cmdx/i18n/locale_generator.rb +7 -19
- data/lib/locales/af.yml +12 -5
- data/lib/locales/ar.yml +12 -5
- data/lib/locales/az.yml +12 -5
- data/lib/locales/be.yml +12 -5
- data/lib/locales/bg.yml +12 -5
- data/lib/locales/bn.yml +12 -5
- data/lib/locales/bs.yml +12 -5
- data/lib/locales/ca.yml +12 -5
- data/lib/locales/cnr.yml +12 -5
- data/lib/locales/cs.yml +12 -5
- data/lib/locales/cy.yml +12 -5
- data/lib/locales/da.yml +12 -5
- data/lib/locales/de.yml +12 -5
- data/lib/locales/dz.yml +12 -5
- data/lib/locales/el.yml +12 -5
- data/lib/locales/en.yml +12 -5
- data/lib/locales/eo.yml +12 -5
- data/lib/locales/es.yml +12 -5
- data/lib/locales/et.yml +12 -5
- data/lib/locales/eu.yml +12 -5
- data/lib/locales/fa.yml +12 -5
- data/lib/locales/fi.yml +12 -5
- data/lib/locales/fr.yml +12 -5
- data/lib/locales/fy.yml +12 -5
- data/lib/locales/gd.yml +12 -5
- data/lib/locales/gl.yml +12 -5
- data/lib/locales/he.yml +12 -5
- data/lib/locales/hi.yml +12 -5
- data/lib/locales/hr.yml +12 -5
- data/lib/locales/hu.yml +12 -5
- data/lib/locales/hy.yml +12 -5
- data/lib/locales/id.yml +12 -5
- data/lib/locales/is.yml +12 -5
- data/lib/locales/it.yml +12 -5
- data/lib/locales/ja.yml +12 -5
- data/lib/locales/ka.yml +12 -5
- data/lib/locales/kk.yml +12 -5
- data/lib/locales/km.yml +12 -5
- data/lib/locales/kn.yml +12 -5
- data/lib/locales/ko.yml +12 -5
- data/lib/locales/lb.yml +12 -5
- data/lib/locales/lo.yml +12 -5
- data/lib/locales/lt.yml +12 -5
- data/lib/locales/lv.yml +12 -5
- data/lib/locales/mg.yml +12 -5
- data/lib/locales/mk.yml +12 -5
- data/lib/locales/ml.yml +12 -5
- data/lib/locales/mn.yml +12 -5
- data/lib/locales/mr-IN.yml +12 -5
- data/lib/locales/ms.yml +12 -5
- data/lib/locales/nb.yml +12 -5
- data/lib/locales/ne.yml +12 -5
- data/lib/locales/nl.yml +12 -5
- data/lib/locales/nn.yml +12 -5
- data/lib/locales/oc.yml +12 -5
- data/lib/locales/or.yml +12 -5
- data/lib/locales/pa.yml +12 -5
- data/lib/locales/pl.yml +12 -5
- data/lib/locales/pt.yml +12 -5
- data/lib/locales/rm.yml +12 -5
- data/lib/locales/ro.yml +12 -5
- data/lib/locales/ru.yml +12 -5
- data/lib/locales/sc.yml +12 -5
- data/lib/locales/sk.yml +12 -5
- data/lib/locales/sl.yml +12 -5
- data/lib/locales/sq.yml +12 -5
- data/lib/locales/sr.yml +12 -5
- data/lib/locales/st.yml +12 -5
- data/lib/locales/sv.yml +12 -5
- data/lib/locales/sw.yml +12 -5
- data/lib/locales/ta.yml +12 -5
- data/lib/locales/te.yml +12 -5
- data/lib/locales/th.yml +12 -5
- data/lib/locales/tl.yml +12 -5
- data/lib/locales/tr.yml +12 -5
- data/lib/locales/tt.yml +12 -5
- data/lib/locales/ug.yml +12 -5
- data/lib/locales/uk.yml +12 -5
- data/lib/locales/ur.yml +12 -5
- data/lib/locales/uz.yml +12 -5
- data/lib/locales/vi.yml +12 -5
- data/lib/locales/wo.yml +12 -5
- data/lib/locales/zh-CN.yml +12 -5
- data/lib/locales/zh-HK.yml +12 -5
- data/lib/locales/zh-TW.yml +12 -5
- data/lib/locales/zh-YUE.yml +12 -5
- data/src/cmdx-dark-logo.png +0 -0
- data/src/cmdx-light-logo.png +0 -0
- data/src/cmdx-logo.svg +1 -0
- metadata +8 -11
- data/.cursor/prompts/docs.md +0 -12
- data/.cursor/prompts/llms.md +0 -20
- data/.cursor/prompts/rspec.md +0 -24
- data/.cursor/prompts/yardoc.md +0 -14
- data/.cursor/rules/cursor-instructions.mdc +0 -62
- data/src/cmdx-i18n-logo.png +0 -0
data/lib/locales/zh-YUE.yml
CHANGED
|
@@ -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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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.
|
|
4
|
+
version: 2.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Juan Gomez
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - ">="
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version:
|
|
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:
|
|
25
|
+
version: 2.0.0
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: bundler
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -142,11 +142,6 @@ executables: []
|
|
|
142
142
|
extensions: []
|
|
143
143
|
extra_rdoc_files: []
|
|
144
144
|
files:
|
|
145
|
-
- ".cursor/prompts/docs.md"
|
|
146
|
-
- ".cursor/prompts/llms.md"
|
|
147
|
-
- ".cursor/prompts/rspec.md"
|
|
148
|
-
- ".cursor/prompts/yardoc.md"
|
|
149
|
-
- ".cursor/rules/cursor-instructions.mdc"
|
|
150
145
|
- ".irbrc"
|
|
151
146
|
- ".rspec"
|
|
152
147
|
- ".rubocop.yml"
|
|
@@ -246,7 +241,9 @@ files:
|
|
|
246
241
|
- lib/locales/zh-HK.yml
|
|
247
242
|
- lib/locales/zh-TW.yml
|
|
248
243
|
- lib/locales/zh-YUE.yml
|
|
249
|
-
- src/cmdx-
|
|
244
|
+
- src/cmdx-dark-logo.png
|
|
245
|
+
- src/cmdx-light-logo.png
|
|
246
|
+
- src/cmdx-logo.svg
|
|
250
247
|
homepage: https://github.com/drexed/cmdx-i18n
|
|
251
248
|
licenses:
|
|
252
249
|
- MIT
|
|
@@ -264,14 +261,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
264
261
|
requirements:
|
|
265
262
|
- - ">="
|
|
266
263
|
- !ruby/object:Gem::Version
|
|
267
|
-
version: 3.
|
|
264
|
+
version: 3.3.0
|
|
268
265
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
269
266
|
requirements:
|
|
270
267
|
- - ">="
|
|
271
268
|
- !ruby/object:Gem::Version
|
|
272
269
|
version: '0'
|
|
273
270
|
requirements: []
|
|
274
|
-
rubygems_version:
|
|
271
|
+
rubygems_version: 4.0.10
|
|
275
272
|
specification_version: 4
|
|
276
273
|
summary: I18n translations and localization for CMDx.
|
|
277
274
|
test_files: []
|
data/.cursor/prompts/docs.md
DELETED
|
@@ -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
|
data/.cursor/prompts/llms.md
DELETED
|
@@ -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
|
-
```
|
data/.cursor/prompts/rspec.md
DELETED
|
@@ -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
|
data/.cursor/prompts/yardoc.md
DELETED
|
@@ -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,62 +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
|
-
Reference the CMDx::I18n documentation in https://github.com/drexed/cmdx-i18n/blob/main/README.md
|
|
16
|
-
|
|
17
|
-
## Technology Stack
|
|
18
|
-
- Ruby 3.4+
|
|
19
|
-
- RSpec 3.1+
|
|
20
|
-
- CMDx 1.5+
|
|
21
|
-
|
|
22
|
-
## Code Style and Structure
|
|
23
|
-
- Write concise, idiomatic Ruby code with accurate examples
|
|
24
|
-
- Follow Ruby conventions and best practices
|
|
25
|
-
- Use object-oriented and functional programming patterns as appropriate
|
|
26
|
-
- Prefer iteration and modularization over code duplication
|
|
27
|
-
- Use descriptive variable and method names (e.g., user_signed_in?, calculate_total)
|
|
28
|
-
- Write comprehensive code documentation using the Yardoc format
|
|
29
|
-
|
|
30
|
-
## Naming Conventions
|
|
31
|
-
- Use snake_case for file names, method names, and variables
|
|
32
|
-
- Use CamelCase for class and module names
|
|
33
|
-
|
|
34
|
-
## Syntax and Formatting
|
|
35
|
-
- Follow the Ruby Style Guide (https://rubystyle.guide/)
|
|
36
|
-
- Follow Ruby style conventions (2-space indentation, snake_case methods)
|
|
37
|
-
- Use Ruby's expressive syntax (e.g., unless, ||=, &.)
|
|
38
|
-
- Prefer double quotes for strings
|
|
39
|
-
- Respect my Rubocop options
|
|
40
|
-
|
|
41
|
-
## Performance Optimization
|
|
42
|
-
- Use memoization for expensive operations
|
|
43
|
-
|
|
44
|
-
## Testing
|
|
45
|
-
- Follow the RSpec Style Guide (https://rspec.rubystyle.guide/)
|
|
46
|
-
- Write comprehensive tests using RSpec
|
|
47
|
-
- It's ok to put multiple assertions in the same example
|
|
48
|
-
- Include both BDD and TDD based tests
|
|
49
|
-
- Create test objects to share across tests
|
|
50
|
-
- Do NOT make tests for obvious or reflective expectations
|
|
51
|
-
- Prefer real objects over mocks. Use `instance_double` if necessary; never `double`
|
|
52
|
-
- Don't test declarative configuration
|
|
53
|
-
- Use appropriate matchers
|
|
54
|
-
- Update tests and update Yardocs after you write code
|
|
55
|
-
|
|
56
|
-
## Documentation
|
|
57
|
-
- Utilize the YARDoc format when documenting Ruby code
|
|
58
|
-
- Follow these best practices:
|
|
59
|
-
- Avoid redundant comments that merely restate the code
|
|
60
|
-
- Keep comments up-to-date with code changes
|
|
61
|
-
- Keep documentation consistent
|
|
62
|
-
- Update CHANGELOG.md with any changes
|
data/src/cmdx-i18n-logo.png
DELETED
|
Binary file
|