Translations
This commit is contained in:
@@ -38,7 +38,6 @@ import org.solovyev.android.calculator.ga.Ga;
|
||||
import org.solovyev.android.calculator.history.History;
|
||||
import org.solovyev.android.calculator.language.Language;
|
||||
import org.solovyev.android.calculator.language.Languages;
|
||||
import org.solovyev.common.msg.MessageType;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.inject.Inject;
|
||||
@@ -88,9 +87,6 @@ public class CalculatorApplication extends android.app.Application implements Sh
|
||||
@Inject
|
||||
ErrorReporter errorReporter;
|
||||
|
||||
@Inject
|
||||
Notifier notifier;
|
||||
|
||||
@Inject
|
||||
ActivityLauncher launcher;
|
||||
|
||||
@@ -190,7 +186,6 @@ public class CalculatorApplication extends android.app.Application implements Sh
|
||||
if (Preferences.Onscreen.showAppIcon.getKey().equals(key)) {
|
||||
boolean showAppIcon = Preferences.Onscreen.showAppIcon.getPreference(prefs);
|
||||
App.enableComponent(this, FloatingCalculatorActivity.class, showAppIcon);
|
||||
notifier.showMessage(R.string.cpp_this_change_may_require_reboot, MessageType.info);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -274,7 +274,7 @@ public abstract class BaseFunctionFragment extends BaseDialogFragment implements
|
||||
private boolean validateBody() {
|
||||
final String body = bodyView.getText().toString();
|
||||
if (TextUtils.isEmpty(body)) {
|
||||
setError(bodyLabel, getString(R.string.function_is_empty));
|
||||
setError(bodyLabel, getString(R.string.cpp_field_cannot_be_empty));
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
@@ -308,10 +308,10 @@ public abstract class BaseFunctionFragment extends BaseDialogFragment implements
|
||||
clearError(paramLabel);
|
||||
} else if (!Engine.isValidName(parameter)) {
|
||||
valid = false;
|
||||
setError(paramLabel, getString(R.string.cpp_invalid_name));
|
||||
setError(paramLabel, getString(R.string.cpp_name_contains_invalid_characters));
|
||||
} else if (usedParameters.contains(parameter)) {
|
||||
valid = false;
|
||||
setError(paramLabel, getString(R.string.cpp_fn_duplicate_parameter));
|
||||
setError(paramLabel, getString(R.string.cpp_duplicate_parameter, parameter));
|
||||
} else {
|
||||
usedParameters.add(parameter);
|
||||
clearError(paramLabel);
|
||||
|
@@ -7,6 +7,7 @@ import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.text.TextUtils;
|
||||
import jscl.math.function.Function;
|
||||
import org.solovyev.android.Check;
|
||||
import org.solovyev.android.calculator.App;
|
||||
@@ -68,8 +69,12 @@ public class EditFunctionFragment extends BaseFunctionFragment {
|
||||
@Override
|
||||
protected boolean validateName() {
|
||||
final String name = nameView.getText().toString();
|
||||
if (TextUtils.isEmpty(name)) {
|
||||
setError(nameLabel, getString(R.string.cpp_field_cannot_be_empty));
|
||||
return false;
|
||||
}
|
||||
if (!Engine.isValidName(name)) {
|
||||
setError(nameLabel, getString(R.string.function_name_is_not_valid));
|
||||
setError(nameLabel, getString(R.string.cpp_name_contains_invalid_characters));
|
||||
return false;
|
||||
}
|
||||
final Function existingFunction = functionsRegistry.get(name);
|
||||
|
@@ -194,7 +194,7 @@ public class FunctionParamsView extends LinearLayout {
|
||||
paramView.setInputType(EditorInfo.TYPE_CLASS_TEXT);
|
||||
paramView.setId(id);
|
||||
paramView.setTag(PARAM_VIEW_TAG);
|
||||
paramView.setHint(R.string.cpp_fn_parameter);
|
||||
paramView.setHint(R.string.cpp_parameter);
|
||||
paramLabel.addView(paramView, new TextInputLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT));
|
||||
|
||||
rowView.addView(paramLabel, new LayoutParams(0, WRAP_CONTENT, 1));
|
||||
|
Reference in New Issue
Block a user