aigu 0.4.1 → 0.4.2
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/lib/aigu/ios_exporter.rb +1 -1
- data/lib/aigu/version.rb +1 -1
- data/spec/aigu/ios_exporter_spec.rb +9 -9
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1df8fa29f2c2d4944edec253d55c2487878ed074
|
4
|
+
data.tar.gz: b6a98ebf9faedfe1ccc062647c556241d9eed539
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0c6543b338326308b654c2c947cf6902f4ccf9a7183b6dd43247a66b47d3c361002fcddc0c7f66ebcbe859fb361707d0d483c89608b0a8a1f83702f06438c1c
|
7
|
+
data.tar.gz: f5c31a55e98835fe503dcd68162ff2fd05a51f5df571af60b655bed95117f7f9610939e1058abca51588ff07b1f834b09d1cbfdea27c8b031d1f50a9fdcef561
|
data/lib/aigu/ios_exporter.rb
CHANGED
@@ -77,7 +77,7 @@ module Aigu
|
|
77
77
|
# To make it work with objects, we need to convert all %s to %@.
|
78
78
|
# Example: 'Android interpolation %s or %1$s' => 'iOS interpolation %@ or %1$@'.
|
79
79
|
def replace_string_interpolations(string)
|
80
|
-
string.gsub(/%([0-9]+\$)
|
80
|
+
string.gsub(/%([0-9]+\$)?@/, '%\\1s')
|
81
81
|
end
|
82
82
|
|
83
83
|
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity, Metrics/MethodLength, Metrics/BlockNesting
|
data/lib/aigu/version.rb
CHANGED
@@ -10,10 +10,10 @@ describe Aigu::IosExporter do
|
|
10
10
|
"STRING_1" = "Value of string #1";
|
11
11
|
"STRING_2" = "Value of string #2";
|
12
12
|
"STRING_3" = "Value with special chars (%ld) %@\\n = abc";
|
13
|
-
"STRING_4" = "Value with an interpolation
|
14
|
-
"STRING_5" = "Value with
|
15
|
-
"STRING_6" = "Value with an interpolation with an identifier %1
|
16
|
-
"STRING_7" = "Value with %1
|
13
|
+
"STRING_4" = "Value with an interpolation %@.";
|
14
|
+
"STRING_5" = "Value with %@ interpolations %@.";
|
15
|
+
"STRING_6" = "Value with an interpolation with an identifier %1$@.";
|
16
|
+
"STRING_7" = "Value with %1$@ interpolations with an identifier %2$@.";
|
17
17
|
EOS
|
18
18
|
end
|
19
19
|
|
@@ -21,11 +21,11 @@ describe Aigu::IosExporter do
|
|
21
21
|
{
|
22
22
|
'STRING_1' => 'Value of string #1',
|
23
23
|
'STRING_2' => 'Value of string #2',
|
24
|
-
'STRING_3' => 'Value with special chars (%ld)
|
25
|
-
'STRING_4' => 'Value with an interpolation
|
26
|
-
'STRING_5' => 'Value with
|
27
|
-
'STRING_6' => 'Value with an interpolation with an identifier %1
|
28
|
-
'STRING_7' => 'Value with %1
|
24
|
+
'STRING_3' => 'Value with special chars (%ld) %s\n = abc',
|
25
|
+
'STRING_4' => 'Value with an interpolation %s.',
|
26
|
+
'STRING_5' => 'Value with %s interpolations %s.',
|
27
|
+
'STRING_6' => 'Value with an interpolation with an identifier %1$s.',
|
28
|
+
'STRING_7' => 'Value with %1$s interpolations with an identifier %2$s.'
|
29
29
|
}
|
30
30
|
end
|
31
31
|
|