mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 02:39:05 +01:00
Added "translated by" to about menu.
This commit is contained in:
@@ -15,7 +15,7 @@ import org.briarproject.bramble.api.nullsafety.ParametersNotNullByDefault;
|
||||
import org.briarproject.briar.BuildConfig;
|
||||
import org.briarproject.briar.R;
|
||||
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -37,6 +37,7 @@ public class AboutFragment extends Fragment {
|
||||
private TextView briarVersion;
|
||||
private TextView briarWebsite;
|
||||
private TextView briarSourceCode;
|
||||
private TextView translatedBy;
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
@@ -56,6 +57,7 @@ public class AboutFragment extends Fragment {
|
||||
getString(R.string.briar_version, BuildConfig.VERSION_NAME));
|
||||
briarWebsite = requireActivity().findViewById(R.id.BriarWebsite);
|
||||
briarSourceCode = requireActivity().findViewById(R.id.BriarSourceCode);
|
||||
translatedBy = requireActivity().findViewById(R.id.TranslatedBy);
|
||||
briarWebsite.setOnClickListener(View -> {
|
||||
String url = "https://briarproject.org/";
|
||||
Intent i = new Intent(Intent.ACTION_VIEW);
|
||||
@@ -80,6 +82,13 @@ public class AboutFragment extends Fragment {
|
||||
R.string.error_start_activity, LENGTH_LONG).show();
|
||||
}
|
||||
});
|
||||
if (!Locale.getDefault().getLanguage()
|
||||
.equals(Locale.ENGLISH.toString())) {
|
||||
translatedBy.setVisibility(View.VISIBLE);
|
||||
translatedBy.setText(getString(
|
||||
R.string.translated_by,
|
||||
getString(R.string.translator_name)));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -42,4 +42,15 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/BriarWebsite" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/TranslatedBy"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/translated_by"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/BriarSourceCode" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -697,6 +697,8 @@
|
||||
<string name="links">Links</string>
|
||||
<string name="briar_website">\u2022 <a href="">Briar website</a></string>
|
||||
<string name="briar_source_code">\u2022 <a href="">Briar source code</a></string>
|
||||
<string name="translated_by">Translated by: %s</string>
|
||||
<string name="translator_name">Your name</string>
|
||||
|
||||
<!-- Conversation Settings -->
|
||||
<string name="disappearing_messages_title">Disappearing messages</string>
|
||||
|
||||
Reference in New Issue
Block a user