Skip to content

Commit 08cf59d

Browse files
AliSoftwaremokagio
andauthored
Apply suggestions from code review
h/t @mokagio Co-authored-by: Gio Lodi <giovanni.lodi42@gmail.com>
1 parent 58abd7c commit 08cf59d

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_merge_strings_files.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def self.authors
6868
end
6969

7070
def self.is_supported?(platform)
71-
platform == :ios
71+
[:ios, :mac].include? platform
7272
end
7373
end
7474
end

spec/ios_l10n_helper_spec.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ def file_encoding(path)
5252
output_file = File.join(tmp_dir, 'output.strings')
5353
described_class.merge_strings(paths: paths, output_path: output_file)
5454
expect(File.read(output_file)).to eq(File.read(fixture('expected-merged.strings')))
55+
expect(file_encoding(output_file)).to eq(Encoding::UTF_8)
5556
end
5657
end
5758

@@ -85,7 +86,7 @@ def file_encoding(path)
8586
end
8687
end
8788

88-
it 'raises if one of the strings file does not exist' do
89+
it 'raises if any of the strings file does not exist' do
8990
paths = [fixture('Localizable-utf16.strings'), '/these/are/not/the/droids/you/are/looking/for']
9091
Dir.mktmpdir('a8c-release-toolkit-l10n-helper-tests-') do |tmp_dir|
9192
output_file = File.join(tmp_dir, 'output.strings')
@@ -138,8 +139,8 @@ def file_encoding(path)
138139
end
139140
end
140141

141-
# Reads non-latin content from UTF-16BE file and generating output file as UTF8
142-
it 'handles non-latin, Unicode content properly' do
142+
# Reads non-latin content from UTF-16BE file and generates output file as UTF8
143+
it 'handles non-Latin, Unicode content properly' do
143144
non_latin_fixture = fixture('non-latin-utf16.strings')
144145
expected_file = fixture('expected-generated-non-latin.strings')
145146

0 commit comments

Comments
 (0)