@@ -1,8 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<org.joinmastodon.android.ui.views.LinkedTextView
|
||||
android:id="@+id/text"
|
||||
@@ -16,4 +17,10 @@
|
||||
android:paddingBottom="8dp"
|
||||
android:textAppearance="@style/m3_body_large"/>
|
||||
|
||||
</FrameLayout>
|
||||
<ViewStub
|
||||
android:id="@+id/translation_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout="@layout/footer_text_translation"/>
|
||||
|
||||
</LinearLayout>
|
||||
44
mastodon/src/main/res/layout/footer_text_translation.xml
Normal file
44
mastodon/src/main/res/layout/footer_text_translation.xml
Normal file
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/translation_progress"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="center"
|
||||
style="?android:progressBarStyleSmall"/>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="8dp"
|
||||
android:clipToPadding="false"
|
||||
android:baselineAligned="false"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/translation_info_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textAppearance="@style/m3_body_small"
|
||||
android:textColor="?colorM3Secondary"
|
||||
tools:text="Translated from Japanese using DeepL.com"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/translation_show_original"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
style="@style/Widget.Mastodon.M3.Button.Text"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:layout_marginEnd="-8dp"
|
||||
android:text="@string/translation_show_original"/>
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<group android:id="@+id/menu_group1">
|
||||
<!-- TODO translate -->
|
||||
<item android:id="@+id/translate" android:title="@string/translate_post"/>
|
||||
<item android:id="@+id/bookmark" android:title="@string/add_bookmark"/>
|
||||
<item android:id="@+id/share" android:title="@string/button_share"/>
|
||||
<item android:id="@+id/open_in_browser" android:title="@string/open_in_browser"/>
|
||||
|
||||
@@ -589,4 +589,11 @@
|
||||
<string name="time_minutes_ago_short">%dm ago</string>
|
||||
<string name="time_hours_ago_short">%dh ago</string>
|
||||
<string name="time_days_ago_short">%dd ago</string>
|
||||
|
||||
<!-- %s is the name of the post language -->
|
||||
<string name="translate_post">Translate from %s</string>
|
||||
<!-- %1$s is the language, %2$s is the name of the translation service -->
|
||||
<string name="post_translated">Translated from %1$s using %2$s</string>
|
||||
<string name="translation_show_original">Show original</string>
|
||||
<string name="translation_failed">Translation failed. Maybe the administrator has not enabled translations on this server or this server is running an older version of Mastodon where translations are not yet supported.</string>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user