cmdx 1.16.0 → 1.17.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 (98) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -1
  3. data/README.md +3 -0
  4. data/lib/cmdx/attribute.rb +12 -0
  5. data/lib/cmdx/attribute_value.rb +16 -13
  6. data/lib/cmdx/coercions/array.rb +6 -3
  7. data/lib/cmdx/coercions/hash.rb +6 -2
  8. data/lib/cmdx/executor.rb +23 -0
  9. data/lib/cmdx/task.rb +28 -0
  10. data/lib/cmdx/version.rb +1 -1
  11. data/lib/locales/af.yml +3 -1
  12. data/lib/locales/ar.yml +3 -1
  13. data/lib/locales/az.yml +3 -1
  14. data/lib/locales/be.yml +3 -1
  15. data/lib/locales/bg.yml +3 -1
  16. data/lib/locales/bn.yml +3 -1
  17. data/lib/locales/bs.yml +3 -1
  18. data/lib/locales/ca.yml +3 -1
  19. data/lib/locales/cnr.yml +3 -1
  20. data/lib/locales/cs.yml +3 -1
  21. data/lib/locales/cy.yml +3 -1
  22. data/lib/locales/da.yml +3 -1
  23. data/lib/locales/de.yml +3 -1
  24. data/lib/locales/dz.yml +3 -1
  25. data/lib/locales/el.yml +3 -1
  26. data/lib/locales/en.yml +3 -1
  27. data/lib/locales/eo.yml +3 -1
  28. data/lib/locales/es.yml +3 -1
  29. data/lib/locales/et.yml +3 -1
  30. data/lib/locales/eu.yml +3 -1
  31. data/lib/locales/fa.yml +3 -1
  32. data/lib/locales/fi.yml +3 -1
  33. data/lib/locales/fr.yml +3 -1
  34. data/lib/locales/fy.yml +3 -1
  35. data/lib/locales/gd.yml +3 -1
  36. data/lib/locales/gl.yml +3 -1
  37. data/lib/locales/he.yml +3 -1
  38. data/lib/locales/hi.yml +3 -1
  39. data/lib/locales/hr.yml +3 -1
  40. data/lib/locales/hu.yml +3 -1
  41. data/lib/locales/hy.yml +3 -1
  42. data/lib/locales/id.yml +3 -1
  43. data/lib/locales/is.yml +3 -1
  44. data/lib/locales/it.yml +3 -1
  45. data/lib/locales/ja.yml +3 -1
  46. data/lib/locales/ka.yml +3 -1
  47. data/lib/locales/kk.yml +3 -1
  48. data/lib/locales/km.yml +3 -1
  49. data/lib/locales/kn.yml +3 -1
  50. data/lib/locales/ko.yml +3 -1
  51. data/lib/locales/lb.yml +3 -1
  52. data/lib/locales/lo.yml +3 -1
  53. data/lib/locales/lt.yml +3 -1
  54. data/lib/locales/lv.yml +3 -1
  55. data/lib/locales/mg.yml +3 -1
  56. data/lib/locales/mk.yml +3 -1
  57. data/lib/locales/ml.yml +3 -1
  58. data/lib/locales/mn.yml +3 -1
  59. data/lib/locales/mr-IN.yml +3 -1
  60. data/lib/locales/ms.yml +3 -1
  61. data/lib/locales/nb.yml +3 -1
  62. data/lib/locales/ne.yml +3 -1
  63. data/lib/locales/nl.yml +3 -1
  64. data/lib/locales/nn.yml +3 -1
  65. data/lib/locales/oc.yml +3 -1
  66. data/lib/locales/or.yml +3 -1
  67. data/lib/locales/pa.yml +3 -1
  68. data/lib/locales/pl.yml +3 -1
  69. data/lib/locales/pt.yml +3 -1
  70. data/lib/locales/rm.yml +3 -1
  71. data/lib/locales/ro.yml +3 -1
  72. data/lib/locales/ru.yml +3 -1
  73. data/lib/locales/sc.yml +3 -1
  74. data/lib/locales/sk.yml +3 -1
  75. data/lib/locales/sl.yml +3 -1
  76. data/lib/locales/sq.yml +3 -1
  77. data/lib/locales/sr.yml +3 -1
  78. data/lib/locales/st.yml +3 -1
  79. data/lib/locales/sv.yml +3 -1
  80. data/lib/locales/sw.yml +3 -1
  81. data/lib/locales/ta.yml +3 -1
  82. data/lib/locales/te.yml +3 -1
  83. data/lib/locales/th.yml +3 -1
  84. data/lib/locales/tl.yml +3 -1
  85. data/lib/locales/tr.yml +3 -1
  86. data/lib/locales/tt.yml +3 -1
  87. data/lib/locales/ug.yml +3 -1
  88. data/lib/locales/uk.yml +3 -1
  89. data/lib/locales/ur.yml +3 -1
  90. data/lib/locales/uz.yml +3 -1
  91. data/lib/locales/vi.yml +3 -1
  92. data/lib/locales/wo.yml +3 -1
  93. data/lib/locales/zh-CN.yml +3 -1
  94. data/lib/locales/zh-HK.yml +3 -1
  95. data/lib/locales/zh-TW.yml +3 -1
  96. data/lib/locales/zh-YUE.yml +3 -1
  97. data/mkdocs.yml +2 -0
  98. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d864a54c25ea1fd3a30f5c84b760bfa1f50207f7b26e47143876c76e2258b37a
4
- data.tar.gz: f1381fc4c62e761b0553800ccdd28a1aa0315e8dab4c2504692d936635b07063
3
+ metadata.gz: 6f8ab8732cd1ac0a15ac46872e78dc5d9549905c52bfda74d24948cae216b0d5
4
+ data.tar.gz: 7735fc7d16163a8265adc59ad35f17990887c853aded67a92d5039c44c2df888
5
5
  SHA512:
6
- metadata.gz: 3431a3d16f0ac92ebb52daa8c412d8f9e33975deab27482d6756e00935015100b3edeb008a419d28daf3daa5e3ba59456110b8ef9554a648ebda348d68152609
7
- data.tar.gz: b7837730a25c052356e45d56c69f2f41baa932362031f4f3f2fb9f5302020fff4ed8d690973afd0b482ba22a38d13091fe47f11b54635f1c321372bcbbf0cf60
6
+ metadata.gz: 294c1f8cf3eab880c4e2f5d12c8655b246534cb61c357531171e90102f73146c37efc185cc6e877e4680c5a2809f0d3cba4fb64bf59fe1b6fea410da65454c9e
7
+ data.tar.gz: d5e8e31425d658cfe151eeab44c938352d92d4f9e96326691d0c63b2688f0eeb64db26f7297d38264cbc6485c7355ae1ea3ad9a486a4ea0ccea8c02e4cd07a13
data/CHANGELOG.md CHANGED
@@ -4,7 +4,22 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
- ## [Unreleased]
7
+ ## [TODO]
8
+
9
+ ## [1.17.0] - 2025-02-23
10
+
11
+ ### Added
12
+ - Add `returns` macro for context output validation after task execution
13
+ - Add `remove_return`/`remove_returns` macro to remove declared returns (supports inheritance)
14
+ - Add array coercion for JSON `"null"` string as empty array
15
+ - Add hash coercion for JSON `"null"` string as empty hash
16
+ - Add attribute sourcing to support both string and symbol keys when sourcing/deriving from Hash
17
+
18
+ ## Changed
19
+ - Do not fail coercion if nil on optional attributes
20
+ - Include the source method in the required attribute error message
21
+
22
+ ## [1.16.0] - 2025-02-06
8
23
 
9
24
  ### Added
10
25
  - Add `CMDx::Exception` alias for `CMDx::Error`
data/README.md CHANGED
@@ -59,8 +59,11 @@ class AnalyzeMetrics < CMDx::Task
59
59
  on_success :track_analysis_completion!
60
60
 
61
61
  required :dataset_id, type: :integer, numeric: { min: 1 }
62
+
62
63
  optional :analysis_type, default: "standard"
63
64
 
65
+ returns :result, :analyzed_at
66
+
64
67
  def work
65
68
  if dataset.nil?
66
69
  fail!("Dataset not found", code: 404)
@@ -184,6 +184,18 @@ module CMDx
184
184
 
185
185
  end
186
186
 
187
+ # Checks if the attribute is optional.
188
+ #
189
+ # @return [Boolean] true if the attribute is optional, false otherwise
190
+ #
191
+ # @example
192
+ # attribute.optional? # => true
193
+ #
194
+ # @rbs () -> bool
195
+ def optional?
196
+ !required? || !!options[:optional]
197
+ end
198
+
187
199
  # Checks if the attribute is required.
188
200
  #
189
201
  # @return [Boolean] true if the attribute is required, false otherwise
@@ -18,7 +18,7 @@ module CMDx
18
18
  # @rbs @attribute: Attribute
19
19
  attr_reader :attribute
20
20
 
21
- def_delegators :attribute, :task, :parent, :name, :options, :types, :source, :method_name, :required?
21
+ def_delegators :attribute, :task, :parent, :name, :options, :types, :source, :method_name, :required?, :optional?
22
22
  def_delegators :task, :attributes, :errors
23
23
 
24
24
  # Creates a new attribute value manager for the given attribute.
@@ -113,10 +113,11 @@ module CMDx
113
113
 
114
114
  if required? && (parent.nil? || parent&.required?) && Utils::Condition.evaluate(task, options)
115
115
  case sourced_value
116
- when Context, Hash then sourced_value.key?(name)
116
+ when Context then sourced_value.key?(name)
117
+ when Hash then sourced_value.key?(name.to_s) || sourced_value.key?(name.to_sym)
117
118
  when Proc then true # HACK: Cannot be determined so assume it will respond
118
119
  else sourced_value.respond_to?(name, true)
119
- end || errors.add(method_name, Locale.t("cmdx.attributes.required"))
120
+ end || errors.add(method_name, Locale.t("cmdx.attributes.required", method: source))
120
121
  end
121
122
 
122
123
  sourced_value
@@ -164,7 +165,8 @@ module CMDx
164
165
  def derive_value(source_value)
165
166
  derived_value =
166
167
  case source_value
167
- when Context, Hash then source_value[name]
168
+ when Context then source_value[name]
169
+ when Hash then source_value[name.to_s] || source_value[name.to_sym]
168
170
  when Symbol then source_value.send(name)
169
171
  when Proc then task.instance_exec(name, &source_value)
170
172
  else source_value.call(task, name) if source_value.respond_to?(:call)
@@ -222,16 +224,17 @@ module CMDx
222
224
  rescue CoercionError => e
223
225
  next if i != last_idx
224
226
 
225
- message =
226
- if last_idx.zero?
227
- e.message
228
- else
229
- tl = types.map { |t| Locale.t("cmdx.types.#{t}") }.join(", ")
230
- Locale.t("cmdx.coercions.into_any", types: tl)
231
- end
227
+ unless optional? && transformed_value.nil?
228
+ message =
229
+ if last_idx.zero?
230
+ e.message
231
+ else
232
+ tl = types.map { |t| Locale.t("cmdx.types.#{t}") }.join(", ")
233
+ Locale.t("cmdx.coercions.into_any", types: tl)
234
+ end
232
235
 
233
- errors.add(method_name, message)
234
- nil
236
+ errors.add(method_name, message)
237
+ end
235
238
  end
236
239
  end
237
240
 
@@ -5,7 +5,7 @@ module CMDx
5
5
  # Converts various input types to Array format
6
6
  #
7
7
  # Handles conversion from strings that look like JSON arrays and other
8
- # values that can be converted to arrays using Ruby's Array() method.
8
+ # values that can be wrapped in an array using Ruby's Array() method.
9
9
  module Array
10
10
 
11
11
  extend self
@@ -29,8 +29,11 @@ module CMDx
29
29
  #
30
30
  # @rbs (untyped value, ?Hash[Symbol, untyped] options) -> Array[untyped]
31
31
  def call(value, options = {})
32
- if value.is_a?(::String) && value.start_with?("[")
33
- JSON.parse(value)
32
+ if value.is_a?(::String) && (
33
+ value.start_with?("[") ||
34
+ value.strip == "null"
35
+ )
36
+ JSON.parse(value) || []
34
37
  else
35
38
  Array(value)
36
39
  end
@@ -9,6 +9,7 @@ module CMDx
9
9
  # - Hash objects (returned as-is)
10
10
  # - Array objects (converted using Hash[*array])
11
11
  # - JSON strings starting with "{" (parsed into Hash)
12
+ # - JSON strings that are "null" (parsed into empty Hash)
12
13
  # - Other types raise CoercionError
13
14
  module Hash
14
15
 
@@ -39,8 +40,11 @@ module CMDx
39
40
  value
40
41
  elsif value.is_a?(::Array)
41
42
  ::Hash[*value]
42
- elsif value.is_a?(::String) && value.start_with?("{")
43
- JSON.parse(value)
43
+ elsif value.is_a?(::String) && (
44
+ value.start_with?("{") ||
45
+ value.strip == "null"
46
+ )
47
+ JSON.parse(value) || {}
44
48
  elsif value.respond_to?(:to_h)
45
49
  value.to_h
46
50
  else
data/lib/cmdx/executor.rb CHANGED
@@ -66,6 +66,7 @@ module CMDx
66
66
  task.class.settings[:middlewares].call!(task) do
67
67
  pre_execution! unless @pre_execution
68
68
  execution!
69
+ verify_returns!
69
70
  rescue UndefinedMethodError => e
70
71
  raise(e) # No need to clear the Chain since exception is not being re-raised
71
72
  rescue Fault => e
@@ -97,6 +98,7 @@ module CMDx
97
98
  task.class.settings[:middlewares].call!(task) do
98
99
  pre_execution! unless @pre_execution
99
100
  execution!
101
+ verify_returns!
100
102
  rescue UndefinedMethodError => e
101
103
  raise_exception(e)
102
104
  rescue Fault => e
@@ -231,6 +233,27 @@ module CMDx
231
233
  task.work
232
234
  end
233
235
 
236
+ # Verifies that all declared returns are present in the context after execution.
237
+ #
238
+ # @rbs () -> void
239
+ def verify_returns!
240
+ return unless result.success?
241
+
242
+ returns = Array(task.class.settings[:returns])
243
+ missing = returns.reject { |name| task.context.key?(name) }
244
+ return if missing.empty?
245
+
246
+ missing.each { |name| task.errors.add(name, Locale.t("cmdx.returns.missing")) }
247
+
248
+ result.fail!(
249
+ Locale.t("cmdx.faults.invalid"),
250
+ errors: {
251
+ full_message: task.errors.to_s,
252
+ messages: task.errors.to_h
253
+ }
254
+ )
255
+ end
256
+
234
257
  # Performs post-execution tasks including callback invocation.
235
258
  #
236
259
  # @rbs () -> void
data/lib/cmdx/task.rb CHANGED
@@ -130,6 +130,7 @@ module CMDx
130
130
  end
131
131
 
132
132
  hash[:attributes] ||= AttributeRegistry.new
133
+ hash[:returns] ||= []
133
134
  hash[:tags] ||= []
134
135
 
135
136
  hash.merge!(options)
@@ -217,6 +218,33 @@ module CMDx
217
218
  end
218
219
  alias remove_attribute remove_attributes
219
220
 
221
+ # Declares expected context returns that must be set after task execution.
222
+ # If any declared return is missing from the context after {#work} completes
223
+ # successfully, the task will fail with a validation error.
224
+ #
225
+ # @param names [Array<Symbol, String>] Names of expected return keys in the context
226
+ #
227
+ # @example
228
+ # returns :user, :token
229
+ #
230
+ # @rbs (*untyped names) -> void
231
+ def returns(*names)
232
+ settings[:returns] |= names.map(&:to_sym)
233
+ end
234
+
235
+ # Removes declared returns from the task.
236
+ #
237
+ # @param names [Array<Symbol>] Names of returns to remove
238
+ #
239
+ # @example
240
+ # remove_returns :old_return
241
+ #
242
+ # @rbs (*Symbol names) -> void
243
+ def remove_returns(*names)
244
+ settings[:returns] -= names.map(&:to_sym)
245
+ end
246
+ alias remove_return remove_returns
247
+
220
248
  # @return [Hash] Hash of attribute names to their configurations
221
249
  #
222
250
  # @example
data/lib/cmdx/version.rb CHANGED
@@ -5,6 +5,6 @@ module CMDx
5
5
  # @return [String] the version of the CMDx gem
6
6
  #
7
7
  # @rbs return: String
8
- VERSION = "1.16.0"
8
+ VERSION = "1.17.0"
9
9
 
10
10
  end
data/lib/locales/af.yml CHANGED
@@ -1,13 +1,15 @@
1
1
  af:
2
2
  cmdx:
3
3
  attributes:
4
- required: "moet toeganklik wees via die bron"
4
+ required: "moet toeganklik wees via die %{method} bronmetode"
5
5
  undefined: "delegeer na ongedefinieerde metode %{method}"
6
6
  coercions:
7
7
  into_a: "kon nie na %{type} omskep word nie"
8
8
  into_an: "kon nie na %{type} omskep word nie"
9
9
  into_any: "kon nie na een van: %{types} omskep word nie"
10
10
  unknown: "onbekende %{type} omskep tipe"
11
+ returns:
12
+ missing: "moet in die konteks gestel word"
11
13
  faults:
12
14
  invalid: "Ongeldig"
13
15
  unspecified: "Ongespesifiseer"
data/lib/locales/ar.yml CHANGED
@@ -1,13 +1,15 @@
1
1
  ar:
2
2
  cmdx:
3
3
  attributes:
4
- required: "يجب أن يكون قابلاً للوصول عبر المصدر"
4
+ required: "يجب أن يكون قابلاً للوصول عبر طريقة المصدر %{method}"
5
5
  undefined: "يفوض إلى طريقة غير معرفة %{method}"
6
6
  coercions:
7
7
  into_a: "لا يمكن تحويله إلى %{type}"
8
8
  into_an: "لا يمكن تحويله إلى %{type}"
9
9
  into_any: "لا يمكن تحويله إلى واحد من: %{types}"
10
10
  unknown: "نوع تحويل %{type} غير معروف"
11
+ returns:
12
+ missing: "يجب تعيينه في السياق"
11
13
  faults:
12
14
  invalid: "غير صالح"
13
15
  unspecified: "غير محدد"
data/lib/locales/az.yml CHANGED
@@ -1,13 +1,15 @@
1
1
  az:
2
2
  cmdx:
3
3
  attributes:
4
- required: "mənbə vasitəsilə əlçatan olmalıdır"
4
+ required: "%{method} mənbə metodu vasitəsilə əlçatan olmalıdır"
5
5
  undefined: "müəyyən edilməmiş metoda %{method} təyin edir"
6
6
  coercions:
7
7
  into_a: "%{type} tipinə çevrilə bilmədi"
8
8
  into_an: "%{type} tipinə çevrilə bilmədi"
9
9
  into_any: "aşağıdakılardan birinə çevrilə bilmədi: %{types}"
10
10
  unknown: "naməlum %{type} çevrilmə tipi"
11
+ returns:
12
+ missing: "kontekstdə təyin edilməlidir"
11
13
  faults:
12
14
  invalid: "Etibarsız"
13
15
  unspecified: "Göstərilməyib"
data/lib/locales/be.yml CHANGED
@@ -1,13 +1,15 @@
1
1
  be:
2
2
  cmdx:
3
3
  attributes:
4
- required: "павінна быць даступна праз крыніцу"
4
+ required: "павінен быць даступны праз зыходны метад %{method}"
5
5
  undefined: "дэлегуе невызначанаму метаду %{method}"
6
6
  coercions:
7
7
  into_a: "не ўдалося пераўтварыць у %{type}"
8
8
  into_an: "не ўдалося пераўтварыць у %{type}"
9
9
  into_any: "не ўдалося пераўтварыць у адзін з: %{types}"
10
10
  unknown: "невядомы тып пераўтварэння %{type}"
11
+ returns:
12
+ missing: "павінна быць усталявана ў кантэксце"
11
13
  faults:
12
14
  invalid: "Няправільныя"
13
15
  unspecified: "Не паказана"
data/lib/locales/bg.yml CHANGED
@@ -1,13 +1,15 @@
1
1
  bg:
2
2
  cmdx:
3
3
  attributes:
4
- required: "трябва да бъде достъпен чрез източника"
4
+ required: "трябва да е достъпен чрез изходния метод %{method}"
5
5
  undefined: "делегира към недефиниран метод %{method}"
6
6
  coercions:
7
7
  into_a: "не може да бъде преобразуван в %{type}"
8
8
  into_an: "не може да бъде преобразуван в %{type}"
9
9
  into_any: "не може да бъде преобразуван в един от: %{types}"
10
10
  unknown: "неизвестен тип преобразуване %{type}"
11
+ returns:
12
+ missing: "трябва да бъде зададено в контекста"
11
13
  faults:
12
14
  invalid: "Невалидни"
13
15
  unspecified: "Не е посочена"
data/lib/locales/bn.yml CHANGED
@@ -1,13 +1,15 @@
1
1
  bn:
2
2
  cmdx:
3
3
  attributes:
4
- required: "উৎসের মাধ্যমে অ্যাক্সেসযোগ্য হতে হবে"
4
+ required: "%{method} সোর্স মেথডের মাধ্যমে অ্যাক্সেসযোগ্য হতে হবে"
5
5
  undefined: "অসংজ্ঞায়িত পদ্ধতিতে %{method} অর্পণ করে"
6
6
  coercions:
7
7
  into_a: "%{type} এ রূপান্তর করা যায়নি"
8
8
  into_an: "%{type} এ রূপান্তর করা যায়নি"
9
9
  into_any: "নিম্নলিখিতগুলির মধ্যে একটিতে রূপান্তর করা যায়নি: %{types}"
10
10
  unknown: "অজানা %{type} রূপান্তর প্রকার"
11
+ returns:
12
+ missing: "প্রসঙ্গে সেট করতে হবে"
11
13
  faults:
12
14
  invalid: "অবৈধ"
13
15
  unspecified: "অনির্দিষ্ট"
data/lib/locales/bs.yml CHANGED
@@ -1,13 +1,15 @@
1
1
  bs:
2
2
  cmdx:
3
3
  attributes:
4
- required: "mora biti dostupan kroz izvor"
4
+ required: "mora biti dostupan preko izvorne metode %{method}"
5
5
  undefined: "delegira nedefiniranoj metodi %{method}"
6
6
  coercions:
7
7
  into_a: "nije mogao biti pretvoren u %{type}"
8
8
  into_an: "nije mogao biti pretvoren u %{type}"
9
9
  into_any: "nije mogao biti pretvoren u jedan od: %{types}"
10
10
  unknown: "nepoznati tip pretvorbe %{type}"
11
+ returns:
12
+ missing: "mora biti postavljeno u kontekstu"
11
13
  faults:
12
14
  invalid: "Neispravni"
13
15
  unspecified: "Nije naveden"
data/lib/locales/ca.yml CHANGED
@@ -1,13 +1,15 @@
1
1
  ca:
2
2
  cmdx:
3
3
  attributes:
4
- required: "ha de ser accessible a través de la font"
4
+ required: "ha de ser accessible mitjançant el mètode font %{method}"
5
5
  undefined: "delega al mètode no definit %{method}"
6
6
  coercions:
7
7
  into_a: "no es va poder convertir a %{type}"
8
8
  into_an: "no es va poder convertir a %{type}"
9
9
  into_any: "no es va poder convertir a un de: %{types}"
10
10
  unknown: "tipus de conversió %{type} desconegut"
11
+ returns:
12
+ missing: "ha de ser establert en el context"
11
13
  faults:
12
14
  invalid: "No vàlides"
13
15
  unspecified: "No especificat"
data/lib/locales/cnr.yml CHANGED
@@ -1,13 +1,15 @@
1
1
  cnr:
2
2
  cmdx:
3
3
  attributes:
4
- required: "mora biti dostupan preko izvora"
4
+ required: "mora biti dostupan preko izvorne metode %{method}"
5
5
  undefined: "delegira na nedefinisani metod %{method}"
6
6
  coercions:
7
7
  into_a: "nije mogao konvertovati u %{type}"
8
8
  into_an: "nije mogao konvertovati u %{type}"
9
9
  into_any: "nije mogao konvertovati u jedan od: %{types}"
10
10
  unknown: "nepoznati %{type} tip konverzije"
11
+ returns:
12
+ missing: "mora biti postavljeno u kontekstu"
11
13
  faults:
12
14
  invalid: "Neispravni"
13
15
  unspecified: "Nije dat"
data/lib/locales/cs.yml CHANGED
@@ -1,13 +1,15 @@
1
1
  cs:
2
2
  cmdx:
3
3
  attributes:
4
- required: "musí být přístupné přes zdroj"
4
+ required: "musí být přístupné přes zdrojovou metodu %{method}"
5
5
  undefined: "deleguje na nedefinovanou metodu %{method}"
6
6
  coercions:
7
7
  into_a: "nelze převést na %{type}"
8
8
  into_an: "nelze převést na %{type}"
9
9
  into_any: "nelze převést na jeden z: %{types}"
10
10
  unknown: "neznámý typ převodu %{type}"
11
+ returns:
12
+ missing: "musí být nastaveno v kontextu"
11
13
  faults:
12
14
  invalid: "Neplatné"
13
15
  unspecified: "Neurčeno"
data/lib/locales/cy.yml CHANGED
@@ -1,13 +1,15 @@
1
1
  cy:
2
2
  cmdx:
3
3
  attributes:
4
- required: "rhaid iddo fod yn hygyrch drwy'r ffynhonnell"
4
+ required: "rhaid bod yn hygyrch trwy'r dull ffynhonnell %{method}"
5
5
  undefined: "delegio i'r dull amhendant %{method}"
6
6
  coercions:
7
7
  into_a: "ni allwyd ei drawsnewid i %{type}"
8
8
  into_an: "ni allwyd ei drawsnewid i %{type}"
9
9
  into_any: "ni allwyd ei drawsnewid i un o: %{types}"
10
10
  unknown: "math anhysbys o drawsnewid %{type}"
11
+ returns:
12
+ missing: "rhaid ei osod yn y cyd-destun"
11
13
  faults:
12
14
  invalid: "Annilys"
13
15
  unspecified: "Anhebgor"
data/lib/locales/da.yml CHANGED
@@ -1,13 +1,15 @@
1
1
  da:
2
2
  cmdx:
3
3
  attributes:
4
- required: "skal være tilgængelig via kilden"
4
+ required: "skal være tilgængelig via %{method} kildemetoden"
5
5
  undefined: "delegerer til udefineret metode %{method}"
6
6
  coercions:
7
7
  into_a: "kunne ikke konverteres til %{type}"
8
8
  into_an: "kunne ikke konverteres til %{type}"
9
9
  into_any: "kunne ikke konverteres til en af: %{types}"
10
10
  unknown: "ukendt %{type} konverteringstype"
11
+ returns:
12
+ missing: "skal være sat i konteksten"
11
13
  faults:
12
14
  invalid: "Ugyldige"
13
15
  unspecified: "Uspecificeret"
data/lib/locales/de.yml CHANGED
@@ -1,13 +1,15 @@
1
1
  de:
2
2
  cmdx:
3
3
  attributes:
4
- required: "muss über die Quelle zugänglich sein"
4
+ required: "muss über die Quellmethode %{method} zugänglich sein"
5
5
  undefined: "delegiert an undefinierte Methode %{method}"
6
6
  coercions:
7
7
  into_a: "konnte nicht in %{type} umgewandelt werden"
8
8
  into_an: "konnte nicht in %{type} umgewandelt werden"
9
9
  into_any: "konnte nicht in einen von: %{types} umgewandelt werden"
10
10
  unknown: "unbekannter %{type} Umwandlungstyp"
11
+ returns:
12
+ missing: "muss im Kontext gesetzt sein"
11
13
  faults:
12
14
  invalid: "Ungültig"
13
15
  unspecified: "Nicht angegeben"
data/lib/locales/dz.yml CHANGED
@@ -1,13 +1,15 @@
1
1
  dz:
2
2
  cmdx:
3
3
  attributes:
4
- required: "ཁུངས་ཆུང་བརྒྱུད་ནས་འཇུག་ཆོག་པ་ཆེད་དགོས་པ་ཡིན།"
4
+ required: "%{method} གི་འབྱུང་ཁུངས་ཐབས་ལམ་བརྒྱུད་དེ་འཛུལ་སྤྱོད་འབད་ཚུགསཔ་དགོ།"
5
5
  undefined: "ཚད་མ་ཆག་པའི་ཐབས་ལམ་ %{method} ལ་ཆ་རྐྱེན་བྱེད།"
6
6
  coercions:
7
7
  into_a: "%{type} ལ་བསྒྱུར་མ་ཐུབ།"
8
8
  into_an: "%{type} ལ་བསྒྱུར་མ་ཐུབ།"
9
9
  into_any: "འདི་ཚོའི་ནང་ནས་གཅིག་ལ་བསྒྱུར་མ་ཐུབ། %{types}"
10
10
  unknown: "མ་ཤེས་པའི་ %{type} བསྒྱུར་པའི་རིགས།"
11
+ returns:
12
+ missing: "སྐབས་དོན་ནང་བཀོད་དགོས"
11
13
  faults:
12
14
  invalid: "ཆ་རྐྱེན་མི་ཆོག"
13
15
  unspecified: "མ་བཟུང་།"
data/lib/locales/el.yml CHANGED
@@ -1,13 +1,15 @@
1
1
  el:
2
2
  cmdx:
3
3
  attributes:
4
- required: "πρέπει να είναι προσβάσιμο μέσω της πηγής"
4
+ required: "πρέπει να είναι προσβάσιμο μέσω της μεθόδου πηγής %{method}"
5
5
  undefined: "αντιπροσωπεύει απροσδιόριστη μέθοδο %{method}"
6
6
  coercions:
7
7
  into_a: "δεν μπόρεσε να μετατραπεί σε %{type}"
8
8
  into_an: "δεν μπόρεσε να μετατραπεί σε %{type}"
9
9
  into_any: "δεν μπόρεσε να μετατραπεί σε ένα από: %{types}"
10
10
  unknown: "άγνωστος τύπος μετατροπής %{type}"
11
+ returns:
12
+ missing: "πρέπει να οριστεί στο πλαίσιο"
11
13
  faults:
12
14
  invalid: "Μη έγκυρες"
13
15
  unspecified: "Απροσδιόριστο"
data/lib/locales/en.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  en:
2
2
  cmdx:
3
3
  attributes:
4
- required: "must be accessible via the source"
4
+ required: "must be accessible via the %{method} source method"
5
5
  undefined: "delegates to undefined method %{method}"
6
6
  coercions:
7
7
  into_a: "could not coerce into a %{type}"
@@ -11,6 +11,8 @@ en:
11
11
  faults:
12
12
  invalid: "Invalid"
13
13
  unspecified: "Unspecified"
14
+ returns:
15
+ missing: "must be set in the context"
14
16
  types:
15
17
  array: "array"
16
18
  big_decimal: "big decimal"
data/lib/locales/eo.yml CHANGED
@@ -1,13 +1,15 @@
1
1
  eo:
2
2
  cmdx:
3
3
  attributes:
4
- required: "devas esti alirebla tra la fonto"
4
+ required: "devas esti alirebla per la fontmetodo %{method}"
5
5
  undefined: "delegas al nedifinita metodo %{method}"
6
6
  coercions:
7
7
  into_a: "ne povis esti konvertita al %{type}"
8
8
  into_an: "ne povis esti konvertita al %{type}"
9
9
  into_any: "ne povis esti konvertita al unu el: %{types}"
10
10
  unknown: "nekonata %{type} konverta tipo"
11
+ returns:
12
+ missing: "devas esti agordita en la kunteksto"
11
13
  faults:
12
14
  invalid: "Nevalidaj"
13
15
  unspecified: "Nespecifita"
data/lib/locales/es.yml CHANGED
@@ -1,13 +1,15 @@
1
1
  es:
2
2
  cmdx:
3
3
  attributes:
4
- required: "debe ser accesible a través de la fuente"
4
+ required: "debe ser accesible a través del método de origen %{method}"
5
5
  undefined: "delega a método indefinido %{method}"
6
6
  coercions:
7
7
  into_a: "no se pudo convertir en un %{type}"
8
8
  into_an: "no se pudo convertir en un %{type}"
9
9
  into_any: "no se pudo convertir en uno de: %{types}"
10
10
  unknown: "tipo de conversión %{type} desconocido"
11
+ returns:
12
+ missing: "debe estar establecido en el contexto"
11
13
  faults:
12
14
  invalid: "Inválidas"
13
15
  unspecified: "No especificada"
data/lib/locales/et.yml CHANGED
@@ -1,13 +1,15 @@
1
1
  et:
2
2
  cmdx:
3
3
  attributes:
4
- required: "peab olema kättesaadav läbi allika"
4
+ required: "peab olema juurdepääsetav lähtemeetodi %{method} kaudu"
5
5
  undefined: "delegeerib määramata meetodile %{method}"
6
6
  coercions:
7
7
  into_a: "ei õnnestunud teisendada %{type} tüübiks"
8
8
  into_an: "ei õnnestunud teisendada %{type} tüübiks"
9
9
  into_any: "ei õnnestunud teisendada üheks järgmistest: %{types}"
10
10
  unknown: "tundmatu %{type} teisendustüüp"
11
+ returns:
12
+ missing: "peab olema kontekstis määratud"
11
13
  faults:
12
14
  invalid: "Kehtetud"
13
15
  unspecified: "Määramata"
data/lib/locales/eu.yml CHANGED
@@ -1,13 +1,15 @@
1
1
  eu:
2
2
  cmdx:
3
3
  attributes:
4
- required: "iturriaren bidez eskuragarri izan behar du"
4
+ required: "eskuragarri egon behar du %{method} iturburu-metodoaren bidez"
5
5
  undefined: "metodo zehaztugabea %{method} delegatzen du"
6
6
  coercions:
7
7
  into_a: "ezin izan da %{type} ra bihurtu"
8
8
  into_an: "ezin izan da %{type} ra bihurtu"
9
9
  into_any: "ezin izan da honetako batera bihurtu: %{types}"
10
10
  unknown: "%{type} bihurtze mota ezezaguna"
11
+ returns:
12
+ missing: "testuinguruan ezarrita egon behar du"
11
13
  faults:
12
14
  invalid: "Baliogabeak"
13
15
  unspecified: "Zehaztu gabe"
data/lib/locales/fa.yml CHANGED
@@ -1,13 +1,15 @@
1
1
  fa:
2
2
  cmdx:
3
3
  attributes:
4
- required: "باید از طریق منبع قابل دسترسی باشد"
4
+ required: "باید از طریق متد منبع %{method} قابل دسترسی باشد"
5
5
  undefined: "به متد تعریف نشده %{method} واگذار می‌کند"
6
6
  coercions:
7
7
  into_a: "نمی‌تواند به %{type} تبدیل شود"
8
8
  into_an: "نمی‌تواند به %{type} تبدیل شود"
9
9
  into_any: "نمی‌تواند به یکی از اینها تبدیل شود: %{types}"
10
10
  unknown: "نوع تبدیل %{type} ناشناخته"
11
+ returns:
12
+ missing: "باید در زمینه تنظیم شود"
11
13
  faults:
12
14
  invalid: "نامعتبر"
13
15
  unspecified: "نامشخص"