<commit_before>package org.mercycorps.translationcards.activity;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.EditText;

import org.mercycorps.translationcards.R;
import org.mercycorps.translationcards.data.DbManager;

import java.util.Date;

public class DeckCreationActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        initView();
    }

    private void initView() {
        setContentView(R.layout.activity_deck_creation);
        final EditText deckNameField = (EditText) findViewById(R.id.field_deck_name);
        final EditText targetLanguagesField = (EditText) findViewById(R.id.field_target_languages);
        findViewById(R.id.button_add_deck).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                DbManager dbm = new DbManager(DeckCreationActivity.this);
                long deckId = dbm.addDeck(
                        deckNameField.getText().toString(), // label
                        getString(R.string.misc_self), // publisher
                        (new Date()).getTime(), // timestamp
                        null, // no external ID
                        null, // hash not relevant
                        false, // not locked
                        "en"); // for now, we assume English (certainly not the least of this
                               // screen's limitations)
                String[] languages = targetLanguagesField.getText().toString().split(",");
                for (int i = 0; i < languages.length; i++) {
                    dbm.addDictionary(languages[i].trim(), "", i, deckId);
                }
                setResult(RESULT_OK);
                finish();
            }
        });
    }
}<commit_msg>Nat #126 fix language in deck creation ordering for case of upper case and lower case input, should still display in alphacetic order<commit_after>package org.mercycorps.translationcards.activity;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.EditText;

import org.mercycorps.translationcards.R;
import org.mercycorps.translationcards.data.DbManager;

import java.util.Date;

public class DeckCreationActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        initView();
    }

    private void initView() {
        setContentView(R.layout.activity_deck_creation);
        final EditText deckNameField = (EditText) findViewById(R.id.field_deck_name);
        final EditText targetLanguagesField = (EditText) findViewById(R.id.field_target_languages);
        findViewById(R.id.button_add_deck).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                DbManager dbm = new DbManager(DeckCreationActivity.this);
                long deckId = dbm.addDeck(
                        deckNameField.getText().toString(), // label
                        getString(R.string.misc_self), // publisher
                        (new Date()).getTime(), // timestamp
                        null, // no external ID
                        null, // hash not relevant
                        false, // not locked
                        "en"); // for now, we assume English (certainly not the least of this
                               // screen's limitations)
                String[] languages = targetLanguagesField.getText().toString().toLowerCase().split(",");
                for (int i = 0; i < languages.length; i++) {
                    dbm.addDictionary(languages[i].trim(), "", i, deckId);
                }
                setResult(RESULT_OK);
                finish();
            }
        });
    }
}
{'fraction_non_alphanumeric': 0.09798488664987405, 'fraction_numerical': 0.0017632241813602015, 'mean_word_length': 2.040581929555896, 'pattern_counts': {'":': 0, '<': 5, '<?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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3876699', 'n_tokens_mistral': 1027, 'n_tokens_neox': 961, 'n_words': 228}