filled strings with polish names

This commit is contained in:
marcin.jedynski 2018-11-21 04:23:22 +01:00
parent 662b8c29c4
commit 8c9eb2c706
4 changed files with 19 additions and 10 deletions

View File

@ -38,7 +38,7 @@ public class FeedbackUtils {
LayoutInflater layoutInflaterAndroid = LayoutInflater.from(activityContext); LayoutInflater layoutInflaterAndroid = LayoutInflater.from(activityContext);
View view = layoutInflaterAndroid.inflate(R.layout.feedback_modal, null); View view = layoutInflaterAndroid.inflate(R.layout.feedback_modal, null);
AlertDialog.Builder alertDialogBuilderUserInput = new AlertDialog.Builder(activityContext); AlertDialog.Builder alertDialogBuilderUserInput = new AlertDialog.Builder(activityContext);
alertDialogBuilderUserInput.setView(view).setPositiveButton("SEND",null); alertDialogBuilderUserInput.setView(view).setPositiveButton(activityContext.getString(R.string.modal_feedback_send),null);
final AlertDialog alertDialog = alertDialogBuilderUserInput.create(); final AlertDialog alertDialog = alertDialogBuilderUserInput.create();
EditText modalUserInput = view.findViewById(R.id.feedback_input); EditText modalUserInput = view.findViewById(R.id.feedback_input);
@ -46,11 +46,10 @@ public class FeedbackUtils {
TextView modalTitle = view.findViewById(R.id.feedback_modal_title); TextView modalTitle = view.findViewById(R.id.feedback_modal_title);
TextView modalSubtitle = view.findViewById(R.id.feedback_modal_subtitle); TextView modalSubtitle = view.findViewById(R.id.feedback_modal_subtitle);
modalTitle.setText(subject); modalTitle.setText(subject);
if( subject == "BUG REPORT"){ if( subject.equals(activityContext.getString(R.string.title_bug_report)) ){
modalSubtitle.setText("Tell us what you noticed!(max 1000 characters)"); modalSubtitle.setText(activityContext.getString(R.string.title_bug_report_notice));
} else if (subject == "FEEDBACK") } else {
{ modalSubtitle.setText(activityContext.getString(R.string.title_feedback_report_notice));
modalSubtitle.setText("Tell us what you think!(max 1000 characters)");
} }
alertDialog.setOnShowListener(new DialogInterface.OnShowListener() { alertDialog.setOnShowListener(new DialogInterface.OnShowListener() {
@Override @Override
@ -61,7 +60,7 @@ public class FeedbackUtils {
public void onClick(View view) { public void onClick(View view) {
String body = modalUserInput.getText().toString(); String body = modalUserInput.getText().toString();
if(TextUtils.isEmpty(body)){ if(TextUtils.isEmpty(body)){
Toast.makeText(activityContext, "Please describe your insights.", Toast.LENGTH_SHORT).show(); Toast.makeText(activityContext, activityContext.getString(R.string.modal_feedback_hint), Toast.LENGTH_SHORT).show();
modalUserInput.requestFocus(); modalUserInput.requestFocus();
}else{ }else{
boolean mode = modalIsAnonymous.isChecked(); boolean mode = modalIsAnonymous.isChecked();
@ -103,7 +102,7 @@ public class FeedbackUtils {
.subscribe(this::handleResponse, this::handleError)); .subscribe(this::handleResponse, this::handleError));
} }
private void handleResponse(Response<Void> resp) { private void handleResponse(Response<Void> resp) {
Toast.makeText(activityContext, "Thank you for subbmiting your feedback", Toast.LENGTH_SHORT).show(); Toast.makeText(activityContext, activityContext.getString(R.string.modal_feedback_thankyou), Toast.LENGTH_SHORT).show();
} }
private void handleError(Throwable error) { private void handleError(Throwable error) {

View File

@ -63,6 +63,5 @@
android:layout_alignEnd="@+id/feedback_input" android:layout_alignEnd="@+id/feedback_input"
android:layout_marginEnd="0dp" android:layout_marginEnd="0dp"
android:layout_marginBottom="-50dp" android:layout_marginBottom="-50dp"
android:text="Tell us what you think (max 1000 characters)"
android:textSize="14sp" /> android:textSize="14sp" />
</RelativeLayout> </RelativeLayout>

View File

@ -138,6 +138,12 @@
<string name="preference_manual_location_button">Wybierz z mapy</string> <string name="preference_manual_location_button">Wybierz z mapy</string>
<string name="permission_denied_explanation">Odmowa dostępu</string> <string name="permission_denied_explanation">Odmowa dostępu</string>
<string name="permission_rationale">Uprawnienia powinny zostać przyznane.</string> <string name="permission_rationale">Uprawnienia powinny zostać przyznane.</string>
<string name="title_feedback_report_notice">Powiedz nam co myślisz!(max 1000 znaków)</string>
<string name="title_bug_report_notice">Powiedz nam co zauważyłeś!(max 1000 znaków)</string>
<string name="title_bug_report">ZGŁOŚ BUG</string>
<string name="title_feedback_report">FEEDBACK</string>
<string name="modal_feedback_send">WYŚLIJ</string>
<string name="modal_feedback_thankyou">Dziękujemy za przesłanie feedbacku.</string>
</resources> </resources>

View File

@ -23,7 +23,12 @@
<string name="email_subject_bug">Find My Tutor - bug report</string> <string name="email_subject_bug">Find My Tutor - bug report</string>
<string name="modal_feedback_hint">Please input your feedback.</string> <string name="modal_feedback_hint">Please input your feedback.</string>
<string name="modal_feedback_question">Send anonymously</string> <string name="modal_feedback_question">Send anonymously</string>
<string name="title_feedback_report_notice">Tell us what you think!(max 1000 characters)</string>
<string name="title_bug_report_notice">Tell us what you noticed!(max 1000 characters)</string>
<string name="title_bug_report">BUG REPORT</string>
<string name="title_feedback_report">FEEDBACK</string>
<string name="modal_feedback_send">SEND</string>
<string name="modal_feedback_thankyou">Thank you for subbmiting your feedback</string>
<!-- Tutors list --> <!-- Tutors list -->
<string name="action_settings">Settings</string> <string name="action_settings">Settings</string>