<commit_before>merge_strings
=============

This tiny script is for you, managing Localizable.strings by hand and grouping keys and values like you wish. it does not put everything in alphabetically order and does not simply add everything at the bottom.

Install
-------

    gem install merge_strings


Example scenario
----------------

Say, your base language is Japanese, and maintain the strings file by hand as implementation goes.

ja.lproj/Localizable.strings:

    /* common alerts and dialogs */
    "yes" = "はい"; /* yes button */
    "no" = "いいえ"; /* no button */
    /* Login */
    "Login failed." = "ログインできませんでした。"

You need to add English as a supported language. It will be OK to copy strings file and modify values for the first time.

en.lproj/Localizable.strings:

    /* common alerts and dialogs */
    "yes" = "Yes"; /* yes button */
    "no" = "No"; /* no button */
    /* Login */
    "Login failed." = "Login failed."

You added a new feature and added a new localizable key in ja.lproj/Localizable.strings:

    /* common alerts and dialogs */
    "yes" = "はい"; /* yes button */
    "no" = "いいえ"; /* no button */
    /* Settings */
    "Font size" = "フォントサイズ";
    /* Login */
    "Login failed." = "ログインできませんでした。"

 Run merge_strings.rb!

    merge_strings.rb ja.lproj/Localizable.strings en.lproj/Localizable.strings

You will see in en.lproj/Localizable.strings:

    /* common alerts and dialogs */
    "yes" = "Yes"; /* yes button */
    "no" = "No"; /* no button */
    /* Settings */
    "Font size" = "Font size"; /* TRANSLATION REQUIRED */
    /* Login */
    "Login failed." = "Login failed."
<commit_msg>Add missing semi-colons of snippets in README<commit_after>merge_strings
=============

This tiny script is for you, managing Localizable.strings by hand and grouping keys and values like you wish. it does not put everything in alphabetically order and does not simply add everything at the bottom.

Install
-------

    gem install merge_strings


Example scenario
----------------

Say, your base language is Japanese, and maintain the strings file by hand as implementation goes.

ja.lproj/Localizable.strings:

    /* common alerts and dialogs */
    "yes" = "はい"; /* yes button */
    "no" = "いいえ"; /* no button */
    /* Login */
    "Login failed." = "ログインできませんでした。";

You need to add English as a supported language. It will be OK to copy strings file and modify values for the first time.

en.lproj/Localizable.strings:

    /* common alerts and dialogs */
    "yes" = "Yes"; /* yes button */
    "no" = "No"; /* no button */
    /* Login */
    "Login failed." = "Login failed.";

You added a new feature and added a new localizable key in ja.lproj/Localizable.strings:

    /* common alerts and dialogs */
    "yes" = "はい"; /* yes button */
    "no" = "いいえ"; /* no button */
    /* Settings */
    "Font size" = "フォントサイズ";
    /* Login */
    "Login failed." = "ログインできませんでした。";

 Run merge_strings.rb!

    merge_strings.rb ja.lproj/Localizable.strings en.lproj/Localizable.strings

You will see in en.lproj/Localizable.strings:

    /* common alerts and dialogs */
    "yes" = "Yes"; /* yes button */
    "no" = "No"; /* no button */
    /* Settings */
    "Font size" = "Font size"; /* TRANSLATION REQUIRED */
    /* Login */
    "Login failed." = "Login failed.";

{'fraction_non_alphanumeric': 0.14427710843373495, 'fraction_numerical': 0.0, 'mean_word_length': 2.6255458515283845, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3884212', 'n_tokens_mistral': 1061, 'n_tokens_neox': 991, 'n_words': 374}