Skip to content

Commit

Permalink
Fixed #156 #158 #159
Browse files Browse the repository at this point in the history
* Added pod spyurk.am
* Added chinese traditional language
* Added NavSlider option: Statistics
* Changed shared-by-notice text
  • Loading branch information
gsantner committed Apr 15, 2017
1 parent 20afd6a commit baff1a1
Show file tree
Hide file tree
Showing 15 changed files with 260 additions and 8 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ Zsolt Szakács (maxigaz AT diaspora DOT zone): Hungarian translation
Danilo Raffaelli (https://crowdin.com/profile/Daraf): Italian translation
O'Loubám (loubam AT diasp DOT org): Galician translation
transifex3 (https://crowdin.com/profile/transifex3): Korean translation
Âng Iōngchun (https://pubpod.alqualonde.org/u/iongchun): Chinese traditional translation
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ protected void updateNavigationViewEntryVisibilities() {
navMenu.findItem(R.id.nav_profile).setVisible(appSettings.isVisibleInNavProfile());
navMenu.findItem(R.id.nav_public).setVisible(appSettings.isVisibleInNavPublic_activities());
navMenu.findItem(R.id.nav_stream).setVisible(true);
navMenu.findItem(R.id.nav_statistics).setVisible(appSettings.isVisibleInNavStatistics());
navMenu.findItem(R.id.nav_reports).setVisible(appSettings.isVisibleInNavReports());
navMenu.findItem(R.id.nav_toggle_desktop_page).setVisible(appSettings.isVisibleToggleMobileDesktop());

Expand Down Expand Up @@ -1046,11 +1047,12 @@ public boolean onNavigationItemSelected(MenuItem item) {

case R.id.nav_contacts: {
if (WebHelper.isOnline(MainActivity.this)) {
openDiasporaUrl(urls.getManageContactsUrl());
openDiasporaUrl(urls.getContactsUrl());
} else {
snackbarNoInternet.show();
}
}
break;

case R.id.nav_activities: {
if (WebHelper.isOnline(MainActivity.this)) {
Expand Down Expand Up @@ -1106,6 +1108,15 @@ public boolean onNavigationItemSelected(MenuItem item) {
}
break;

case R.id.nav_statistics: {
if (WebHelper.isOnline(MainActivity.this)) {
openDiasporaUrl(urls.getStatisticsUrl());
} else {
snackbarNoInternet.show();
}
}
break;

case R.id.nav_toggle_desktop_page: {
openDiasporaUrl(urls.getToggleMobileUrl());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ else if (settings.isKeyEqual(key, R.string.pref_key__clear_cache)) {
} else if (settings.isKeyEqual(key, R.string.pref_key__manage_contacts)) {
Intent intent = new Intent(getActivity(), MainActivity.class);
intent.setAction(MainActivity.ACTION_OPEN_URL);
intent.putExtra(MainActivity.URL_MESSAGE, diasporaUrlHelper.getManageContactsUrl());
intent.putExtra(MainActivity.URL_MESSAGE, diasporaUrlHelper.getContactsUrl());
startActivity(intent);
getActivity().finish();
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ public void onReceive(Context context, Intent intent) {
setTitle(R.string.conversations);
} else if (subUrl.startsWith(DiasporaUrlHelper.SUBURL_NEW_POST)) {
setTitle(R.string.new_post);
} else if (subUrl.startsWith(DiasporaUrlHelper.SUBURL_STATISTICS)) {
setTitle(R.string.statistics);
} else if (subUrl.startsWith(DiasporaUrlHelper.SUBURL_CONTACTS)) {
setTitle(R.string.contacts);
} else if (subUrl.startsWith(DiasporaUrlHelper.SUBURL_PEOPLE + appSettings.getProfileId())) {
setTitle(R.string.nav_profile);
} else if (subUrl.startsWith(DiasporaUrlHelper.SUBURL_ACTIVITY)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,10 @@ public boolean isVisibleInNavContacts() {
return getBool(prefApp, R.string.pref_key__visibility_nav__contacts, false);
}

public boolean isVisibleInNavStatistics() {
return getBool(prefApp, R.string.pref_key__visibility_nav__statistics, false);
}

public boolean isVisibleInNavReports() {
return getBool(prefApp, R.string.pref_key__visibility_nav__reports, false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
public class DiasporaUrlHelper {
private final AppSettings settings;

public static final String URL_BLANK = "about:blank";
public static final String SUBURL_NOTIFICATIONS = "/notifications";
public static final String SUBURL_POSTS = "/posts/";
public static final String SUBURL_STREAM = "/stream";
Expand All @@ -53,9 +54,8 @@ public class DiasporaUrlHelper {
public static final String SUBURL_PERSONAL_SETTINGS = "/user/edit";
public static final String SUBURL_MANAGE_TAGS = "/tag_followings/manage";
public static final String SUBURL_SIGN_IN = "/users/sign_in";
public static final String SUBURL_MANAGE_CONTACTS = "/contacts";
public static final String SUBURL_CONTACTS = "/contacts";
public static final String SUBURL_REPORTS = "/reports";
public static final String URL_BLANK = "about:blank";
public static final String SUBURL_NOTIFICATIONS_ALSO_COMMENTED = "/notifications?type=also_commented";
public static final String SUBURL_NOTIFICATIONS_COMMENT_ON_POST = "/notifications?type=comment_on_post";
public static final String SUBURL_NOTIFICATIONS_LIKED = "/notifications?type=liked";
Expand Down Expand Up @@ -290,8 +290,8 @@ public String getManageTagsUrl() {
*
* @return https://(pod-domain.tld)/contacts
*/
public String getManageContactsUrl() {
return getPodUrl() + SUBURL_MANAGE_CONTACTS;
public String getContactsUrl() {
return getPodUrl() + SUBURL_CONTACTS;
}

public String getSuburlNotificationsAlsoCommentedUrl() {
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/res/drawable/ic_timeline_black_48px.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<vector android:height="24dp" android:viewportHeight="24.0"
android:viewportWidth="24.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#000000" android:pathData="M23,8c0,1.1 -0.9,2 -2,2 -0.18,0 -0.35,-0.02 -0.51,-0.07l-3.56,3.55c0.05,0.16 0.07,0.34 0.07,0.52 0,1.1 -0.9,2 -2,2s-2,-0.9 -2,-2c0,-0.18 0.02,-0.36 0.07,-0.52l-2.55,-2.55c-0.16,0.05 -0.34,0.07 -0.52,0.07s-0.36,-0.02 -0.52,-0.07l-4.55,4.56c0.05,0.16 0.07,0.33 0.07,0.51 0,1.1 -0.9,2 -2,2s-2,-0.9 -2,-2 0.9,-2 2,-2c0.18,0 0.35,0.02 0.51,0.07l4.56,-4.55C8.02,9.36 8,9.18 8,9c0,-1.1 0.9,-2 2,-2s2,0.9 2,2c0,0.18 -0.02,0.36 -0.07,0.52l2.55,2.55c0.16,-0.05 0.34,-0.07 0.52,-0.07s0.36,0.02 0.52,0.07l3.55,-3.56C19.02,8.35 19,8.18 19,8c0,-1.1 0.9,-2 2,-2s2,0.9 2,2z"/>
</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/menu/main__navdrawer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@
android:icon="@drawable/ic_public_black_48px"
android:title="@string/nav_public_activities" />

<item
android:id="@+id/nav_statistics"
android:icon="@drawable/ic_timeline_black_48px"
android:title="@string/nav_statistics" />

<item
android:id="@+id/nav_reports"
android:icon="@drawable/ic_report_black_48px"
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/res/raw/podlist.json
Original file line number Diff line number Diff line change
Expand Up @@ -1011,6 +1011,13 @@
"mainLangs": [],
"id": 24936
},
{
"score": 0,
"podUrls": [{"host": "spyurk.am"}],
"name": "Spyurk",
"mainLangs": [],
"id": 24921
},
{
"score": 0,
"podUrls": [{"host": "pod.mew.cat"}],
Expand Down
43 changes: 43 additions & 0 deletions app/src/main/res/values-zh-rTW/strings-about.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources>
<string name="about_activity__title_about_app">說明</string>
<string name="about_activity__title_about_license">授權條款</string>
<string name="about_activity__title_debug_info">除錯</string>
<string name="fragment_debug__section_app">應用程式</string>
<string name="fragment_debug__section_device">裝置</string>
<string name="fragment_debug__section_pod">diaspora* 豆莢</string>
<string name="fragment_debug__section_log">除錯紀錄</string>
<string name="fragment_debug__section_log_spam">除錯紀錄(詳細版)</string>
<string name="fragment_debug__app_version">應用程式版本: %1$s</string>
<string name="fragment_debug__android_version">Android 版本: %1$s</string>
<string name="fragment_debug__device_name">裝置名稱: %1$s</string>
<string name="fragment_debug__app_codename">代號: %1$s</string>
<string name="fragment_debug__pod_profile_name">豆莢設定名稱: %1$s</string>
<string name="fragment_debug__pod_profile_url">豆莢網址: %1$s</string>
<string name="fragment_debug__toast_log_copied">已經複製除錯紀錄到剪貼簿了</string>
<string name="fragment_about__about_text">dandelion* (蒲公英*) 是你瀏覽 diaspora* 社交網站的好朋友。它讓你的體驗增加了好用的工具列,並且支援像是 Tor 之類的代理伺服器服務。</string>
<string name="fragment_about__contribute">貢獻程式碼!</string>
<string name="fragment_about__contribute_text">dandelion* 是自由軟體開發專案,並且追隨 diaspora* 專案的信念。想要貢獻你的心力嗎?那就來吧!目前我們還只是個很小的團隊,任何形式的幫忙都會讓我們足感心!</string>
<string name="fragment_about__contribute_button">取得源碼</string>
<string name="fragment_about__translate">翻譯應用程式!</string>
<string name="fragment_about__translate_text">應用程式沒有你使用語言的版本嗎?你可以改變現狀!何不來幫忙我們翻譯呢?我們使用 crowdin 平台,好讓每個人都能夠參與應用程式的翻譯工作。</string>
<string name="fragment_about__translate_button">我來翻譯</string>
<string name="fragment_about__feedback">意見回饋!</string>
<string name="fragment_about__feedback_text">dandelion* 還在開發階段,所以如果你有任何建議,或是有其他的意見要回饋,請使用我們的臭蟲追蹤網站來讓我們知道!</string>
<string name="fragment_about__feedback_button">回報臭蟲</string>
<string name="fragment_about__spread_the_word">報給人知!</string>
<string name="fragment_about__spread_the_word_text">告訴你的朋友和家人有 #dandelion 這個好東西!何不部落格一下你的使用經驗呢?我們期待聽聽你的故事!</string>
<string name="fragment_about__spread_the_word_button">分享應用程式</string>
<string name="fragment_about__spread_the_word_share_text">哇!看看 #dandelion 這套應用程式! %1$s</string>
<!-- License & help (large amount of text) -->
<string name="fragment_license__maintainers">維護人員</string>
<string name="fragment_license__maintainers_text">目前這套應用程式是由以下人員開發與維護: &lt;br&gt;&lt;br&gt;%1$s</string>
<string name="fragment_license__contributors">貢獻人</string>
<string name="fragment_license__contributors_thank_you">%1$s&lt;br&gt;&lt;br&gt;感謝你們!</string>
<string name="fragment_license__license_button">GNU GPLv3+ 授權條款</string>
<string name="fragment_license__thirdparty_libs">第三方程式庫</string>
<string name="fragment_license__thirdparty_libs_text">我們使用了下列程式庫:</string>
<string name="fragment_license__misc_leafpic">我們從 LeafPic 應用程式得到一些啟發以及程式碼。去看看吧,它也是自由軟體喔!</string>
<string name="fragment_license__misc_leafpic_button">再多說一些</string>
</resources>
89 changes: 89 additions & 0 deletions app/src/main/res/values-zh-rTW/strings-preferences.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources>
<!-- Key Names (Untranslatable) -->
<!-- Themes -->
<!-- Operability -->
<string name="pref_title__topbar_stream_shortcut">上方工具列可載入流水帳</string>
<string name="pref_desc__topbar_stream_shortcut">可以點上方工具列的空白區域來進入流水帳</string>
<!-- Navigiation Slider -->
<!-- PodProfile -->
<!-- More -->
<!-- Category Titles -->
<string name="pref_cat__visuals">外觀</string>
<string name="pref_cat__network">網路</string>
<string name="pref_cat__pod_settings">豆莢設定</string>
<string name="pref_cat__operability">操作</string>
<!-- Visuals -->
<!-- Navigiation Slider -->
<string name="pref_title__sub_nav_slider">側邊導覽選單</string>
<string name="pref_desc__sub_nav_slider">控制側邊導覽選單中顯示的項目</string>
<string name="pref_cat__visibility_nav_items__user">使用者</string>
<string name="pref_cat__visibility_nav_items__general">平常</string>
<string name="pref_cat__visibility_nav_items__admin">管理員</string>
<!-- Themes -->
<string name="pref_title__themes">佈景主題和色彩</string>
<string name="pref_desc__themes">控制應用程式使用的顏色</string>
<string name="pref_title__primary_color">主要顏色</string>
<string name="pref_desc__primary_color">工具列使用的顏色</string>
<string name="pref_title__accent_color">強調顏色</string>
<string name="pref_desc__accent_color">進度條使用的顏色</string>
<!-- Notifications dropdown -->
<string name="pref_title__extended_notifications">延伸型通知</string>
<string name="pref_desc__extended_notifications">將通知鈴伸展成為顯示通知類別的下拉式選單</string>
<string name="pref_desc__language">更改應用程式使用的語言。要重新開啟應用程式才會生效</string>
<string name="pref_title__language">語言</string>
<string name="language_system">系統設定語言</string>
<!-- Font size -->
<string name="pref_desc__font_size">控制網頁視圖中的文字大小</string>
<string name="pref_title__font_size">字型大小</string>
<!-- prefix 's' is needed to make this a string array. Otherwise ListPreference would crash -->
<string name="font_size_normal">一般</string>
<string name="font_size_large">較大</string>
<string name="font_size_huge">超大</string>
<!-- Load images -->
<string name="pref_title__load_images">載入圖片</string>
<string name="pref_desc__load_images">切換是否要載入圖片,以節省行動資料流量等等</string>
<!-- Screen rotation -->
<string name="pref_title__screen_rotation">畫面旋轉</string>
<string name="pref_desc__screen_rotation">控制畫面自動旋轉功能</string>
<string name="rotation_system">系統預設</string>
<string name="rotation_sensor">感應\n(忽略系統設定)</string>
<string name="rotation_portrait">直向</string>
<string name="rotation_landscape">横向</string>
<!-- Proxy -->
<string name="pref_title__http_proxy_load_tor_preset">載入 Tor 的預設值</string>
<string name="pref_desc__http_proxy_load_tor_preset">載入使用 Tor (Orbot) HTTP 代理伺服器的設定</string>
<string name="pref_title__sub_proxy">代理伺服器</string>
<string name="pref_title__proxy_enabled">啓用代理伺服器</string>
<string name="pref_desc__http_proxy_enabled">讓 dandelion* 透用代理伺服器連網來避開防火牆。\n設定後可能需要重新啟動。某些手機上可能會沒有作用。</string>
<string name="pref_title__http_proxy_host">主機</string>
<string name="pref_title__http_proxy_port">通訊埠</string>
<string name="toast__proxy_disabled__restart_required">應用程式要重新啟動以停止使用代理伺服器</string>
<string name="toast__proxy_orbot_preset_loaded">已經載入 Orbot 的代理伺服器設定了</string>
<!-- Chrome custom tabs -->
<string name="pref_desc__chrome_custom_tabs_enabled">使用 Chrome Custom Tabs 開啟外部連結。必須要安裝 Chromium 或是 Google Chrome 才能使用這個功能。
\n請留意:Chrome Custom Tabs 不會使用應用程式設定的代理伺服器!</string>
<!-- Diaspora Settings -->
<string name="pref_title__personal_settings">個人設定</string>
<string name="pref_desc__personal_settings">打開你的 diaspora* 帳號設定頁面</string>
<string name="pref_desc__manage_contacts">管理聯絡人清單</string>
<string name="pref_title__manage_tags">管理雜湊標籤</string>
<string name="pref_desc__manage_tags">停止追蹤目前正在追蹤中的雜湊標籤</string>
<string name="pref_title__change_account">更換帳號</string>
<string name="pref_desc__change_account">刪除本機連線 session 資料,並改用另外一個 diaspora* 豆莢或帳號</string>
<string name="pref_warning__change_account">將要清除所有的 cookie 和 session 資料。確定真的要切換帳號嗎?</string>
<string name="pref_title__clear_cache">清除快取資料</string>
<string name="pref_desc__clear_cache">清除網頁視圖的快取資料</string>
<string name="pref_desc__intellihide_toolbars">當捲動畫面時,自動隱藏上下兩邊的工具列</string>
<string name="pref_title__intellihide_toolbars">自動隱藏工具列</string>
<string name="pref_title__append_shared_via_app">分享時附加應用程式標記</string>
<string name="pref_desc__append_shared_via_app">在分享的文字之後附加以下應用程式標記: [via #dandelion]</string>
<!-- More -->
<string name="pref_title__sub_miscelaneous">其他</string>
<string name="pref_title__wipe_settings">完全重置</string>
<string name="pref_desc__wipe_settings">將本機上此應用程式的設定全部刪掉,並將所有帳號都登出</string>
<string name="dialog_content__wipe_settings">將要重設此應用程式的所有設定為預設值,並登出你在所有豆莢的帳號。不過不會變動已經下載了的圖片。確定要繼續嗎?</string>
<!-- Recently added - Please move to right section-->
<!-- Sorry -->
</resources>
Loading

0 comments on commit baff1a1

Please sign in to comment.