-
Notifications
You must be signed in to change notification settings - Fork 83
Added comments to output. #84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
5f68962
Added comments to output.
borut-t a9e06ef
Added comments to output.
borut-t 19c4cd0
Fixed typo.
borut-t 7ae98bb
Added csv2android with comments test case.
borut-t 0cf5dab
Fixed typos.
borut-t 2a87a91
Fixed new lines indentation.
borut-t feab4b1
Fixed indentation issue.
borut-t d8757eb
Fixed style.
borut-t f857e06
Fixed typos.
borut-t f1375ab
Replaced single with double quotes.
borut-t 2528ec9
Fixed style issue.
borut-t 1a1498e
Fixed style issue.
borut-t f90246c
Fixed style issue.
borut-t 8879cab
Fixed style issue.
borut-t 4d3b1b1
Fixed style issue.
borut-t a8f31cf
Fixed style issue.
borut-t 03f6b13
Fixed style issue.
borut-t 274836b
Fixed style issue.
borut-t 77cc37f
Fixed style issue.
borut-t 308b39a
Fixed style issue.
borut-t a88fd62
Fixed style issue.
borut-t 70521d2
Fixed style issue.
borut-t b084e0f
Fixed style issue.
borut-t 3c779a6
Fixed style issue.
borut-t File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,7 @@ class TestCSV2Android < Test::Unit::TestCase | |
|
|
||
| def test_converting_csv_to_xml | ||
| csv_file = "test/data/test_data.csv" | ||
| converter = Babelish::CSV2Android.new(csv_file, 'English' => "en") | ||
| converter = Babelish::CSV2Android.new(csv_file, "English" => "en") | ||
| converter.convert | ||
| assert File.exist?("values-en/strings.xml"), "the ouptut file does not exist" | ||
|
|
||
|
|
@@ -24,15 +24,36 @@ def test_converting_csv_with_special_chars | |
|
|
||
| def test_converting_csv_to_dotstrings_one_output_option | ||
| csv_file = "test/data/test_data.csv" | ||
| single_file = 'myApp.xml' | ||
| converter = Babelish::CSV2Android.new(csv_file, | ||
| {'English' => "en"}, | ||
| :output_basename => 'myApp', | ||
| :ignore_lang_path => true) | ||
| single_file = "myApp.xml" | ||
| converter = Babelish::CSV2Android.new( | ||
| csv_file, | ||
| { "English" => "en" }, | ||
| :output_basename => "myApp", | ||
| :ignore_lang_path => true | ||
| ) | ||
| converter.convert | ||
| assert File.exist?(single_file), "the ouptut file does not exist" | ||
|
|
||
| # clean up | ||
| system("rm -rf ./" + single_file) | ||
| end | ||
|
|
||
| def test_converting_with_comments | ||
| csv_file = "test/data/test_data_with_comments.csv" | ||
| french_file = "values-fr/strings.xml" | ||
| expected_output = File.read("test/data/test_data_fr_with_comments.xml") | ||
| converter = Babelish::CSV2Android.new( | ||
| csv_file, | ||
| { "French" => "fr" }, | ||
| :default_lang => "English", | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Align the parameters of a method call if they span more than one line. |
||
| :comments_column => 5 | ||
| ) | ||
| converter.convert | ||
| assert File.exist?(french_file), "the ouptut file does not exist" | ||
| result = File.read(french_file) | ||
| assert_equal expected_output, result | ||
|
|
||
| # clean up | ||
| system("rm -rf values-fr") | ||
| end | ||
| end | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <resources> | ||
|
|
||
| <!-- this is a greeting string --> | ||
| <string name="GREETINGS">Salut</string> | ||
|
|
||
| <!-- this is another example --> | ||
| <string name="ANOTHER_STRING">testEN</string> | ||
| </resources> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Align the parameters of a method call if they span more than one line.