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);
View view = layoutInflaterAndroid.inflate(R.layout.feedback_modal, null);
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();
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 modalSubtitle = view.findViewById(R.id.feedback_modal_subtitle);
modalTitle.setText(subject);
if( subject == "BUG REPORT"){
modalSubtitle.setText("Tell us what you noticed!(max 1000 characters)");
} else if (subject == "FEEDBACK")
{
modalSubtitle.setText("Tell us what you think!(max 1000 characters)");
if( subject.equals(activityContext.getString(R.string.title_bug_report)) ){
modalSubtitle.setText(activityContext.getString(R.string.title_bug_report_notice));
} else {
modalSubtitle.setText(activityContext.getString(R.string.title_feedback_report_notice));
}
alertDialog.setOnShowListener(new DialogInterface.OnShowListener() {
@Override
@ -61,7 +60,7 @@ public class FeedbackUtils {
public void onClick(View view) {
String body = modalUserInput.getText().toString();
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();
}else{
boolean mode = modalIsAnonymous.isChecked();
@ -103,7 +102,7 @@ public class FeedbackUtils {
.subscribe(this::handleResponse, this::handleError));
}
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) {

View File

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

View File

@ -138,6 +138,12 @@
<string name="preference_manual_location_button">Wybierz z mapy</string>
<string name="permission_denied_explanation">Odmowa dostępu</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>

View File

@ -23,7 +23,12 @@
<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_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 -->
<string name="action_settings">Settings</string>