Skip to content

Commit

Permalink
Fixes when building for release: add "translatable=false" to string r…
Browse files Browse the repository at this point in the history
…esources not meant to be translated; remove content description string resources that are not translated for all supported languages.
  • Loading branch information
philliphsu committed Jun 13, 2017
1 parent 3b813ab commit 1c897a3
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
<android.support.design.widget.FloatingActionButton
android:id="@+id/bsp_fab"
android:layout_gravity="center"
android:contentDescription="@string/bsp_desc_done"
style="@style/BSP_GridTimePicker_FabStyle" />

</LinearLayout>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
android:minWidth="@dimen/bsp_month_navigation_bar_height"
android:minHeight="@dimen/bsp_month_navigation_bar_height"
android:visibility="invisible"
android:contentDescription="@string/bsp_date_picker_prev_month_button"
android:nextFocusForward="@+id/bsp_month_year_title"
android:nextFocusDown="@+id/bsp_month_view"
app:srcCompat="@drawable/bsp_ic_chevron_start"
Expand All @@ -36,7 +35,6 @@
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:contentDescription="@string/bsp_date_picker_month_year_title"
android:nextFocusForward="@+id/bsp_next"
android:nextFocusDown="@+id/bsp_month_view"
android:textSize="@dimen/bsp_month_label_size"
Expand All @@ -52,7 +50,6 @@
android:minWidth="@dimen/bsp_month_navigation_bar_height"
android:minHeight="@dimen/bsp_month_navigation_bar_height"
android:visibility="invisible"
android:contentDescription="@string/bsp_date_picker_next_month_button"
android:nextFocusForward="@+id/bsp_month_view"
android:nextFocusDown="@+id/bsp_month_view"
app:srcCompat="@drawable/bsp_ic_chevron_end"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
<android.support.design.widget.FloatingActionButton
android:id="@+id/bsp_fab"
android:layout_gravity="center"
android:contentDescription="@string/bsp_desc_done"
style="@style/BSP_GridTimePicker_FabStyle" />

</LinearLayout>
29 changes: 5 additions & 24 deletions bottomsheetpickers/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,34 +58,15 @@
<string name="bsp_deleted_key"><xliff:g id="key" example="4">%1$s</xliff:g> deleted</string>

<!-- DO NOT TRANSLATE -->
<string name="bsp_time_placeholder">--</string>
<string name="bsp_time_placeholder" translatable="false">--</string>
<!-- DO NOT TRANSLATE -->
<string name="bsp_time_separator">:</string>
<string name="bsp_time_separator" translatable="false">:</string>

<!-- DO NOT TRANSLATE -->
<string name="bsp_radial_numbers_typeface">sans-serif</string>
<string name="bsp_radial_numbers_typeface" translatable="false">sans-serif</string>
<!-- DO NOT TRANSLATE -->
<string name="bsp_sans_serif">sans-serif</string>
<string name="bsp_sans_serif" translatable="false">sans-serif</string>

<!-- DO NOT TRANSLATE -->
<string name="bsp_day_of_week_label_typeface">sans-serif</string>

<!--My stuff-->
<string name="bsp_left_alt_24hr">:00</string>
<string name="bsp_right_alt_24hr">:30</string>
<string name="bsp_hours_00_11">00 &#8211; 11</string>
<string name="bsp_hours_12_23">12 &#8211; 23</string>

<!-- Content description for '00-11' button. [CHAR_LIMIT=NONE] -->
<string name="bsp_desc_half_day_1">morning hours</string>
<!-- Content description for '12-23' button. [CHAR_LIMIT=NONE] -->
<string name="bsp_desc_half_day_2">noon to evening hours</string>
<!-- Content description for 'Done' floating action button. [CHAR_LIMIT=NONE] -->
<string name="bsp_desc_done">done</string>
<!-- Description of the button to move to the previous month. [CHAR LIMIT=NONE] -->
<string name="bsp_date_picker_prev_month_button">Previous month</string>
<!-- Description of the button to move to the next month. [CHAR LIMIT=NONE] -->
<string name="bsp_date_picker_next_month_button">Next month</string>
<!-- Description of the button that displays the month and year title and also accesses the month picker. [CHAR LIMIT=NONE] -->
<string name="bsp_date_picker_month_year_title">Switch to month picker</string>
<string name="bsp_day_of_week_label_typeface" translatable="false">sans-serif</string>
</resources>
2 changes: 1 addition & 1 deletion sample/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<resources>
<string name="app_name">BottomSheetPickers</string>
<string name="app_name" translatable="false">BottomSheetPickers</string>
</resources>

0 comments on commit 1c897a3

Please sign in to comment.