extract html code and make it non-translatable

This commit is contained in:
tobiasKaminsky 2017-07-24 08:35:35 +02:00 committed by AndyScherzinger
parent f239d52098
commit b0b66c6f8e
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
2 changed files with 26 additions and 17 deletions

View file

@ -1,21 +1,21 @@
/**
/*
* Nextcloud Android client application
*
* @author Andy Scherzinger
* @author Tobias Kaminsky
* Copyright (C) 2016 Andy Scherzinger
* Copyright (C) 2016 Nextcloud
* <p/>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
* <p/>
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
* <p/>
*
* You should have received a copy of the GNU Affero General Public
* License along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@ -76,31 +76,34 @@ public class ParticipateActivity extends FileActivity {
TextView contributeIrcView = (TextView) findViewById(R.id.participate_contribute_irc_text);
contributeIrcView.setMovementMethod(LinkMovementMethod.getInstance());
contributeIrcView.setText(Html.fromHtml(
getString(R.string.participate_contribute_irc_text,
contributeIrcView.setText(Html.fromHtml(getString(R.string.participate_contribute_irc_text) + " " +
getString(R.string.participate_contribute_irc_text_link,
ThemeUtils.colorToHexString(ThemeUtils.primaryColor()),
getString(R.string.irc_weblink))));
TextView contributeForumView = (TextView) findViewById(R.id.participate_contribute_forum_text);
contributeForumView.setMovementMethod(LinkMovementMethod.getInstance());
contributeForumView.setText(Html.fromHtml(
getString(R.string.participate_contribute_forum_text,
contributeForumView.setText(Html.fromHtml(getString(R.string.participate_contribute_irc_text) + " " +
getString(R.string.participate_contribute_forum_text_link,
ThemeUtils.colorToHexString(ThemeUtils.primaryColor()),
getString(R.string.help_link))));
getString(R.string.help_link), getString(R.string.participate_contribute_forum_forum))));
TextView contributeTranslationView = (TextView) findViewById(R.id.participate_contribute_translate_text);
contributeTranslationView.setMovementMethod(LinkMovementMethod.getInstance());
contributeTranslationView.setText(Html.fromHtml(
getString(R.string.participate_contribute_translate_text,
getString(R.string.participate_contribute_translate_link,
ThemeUtils.colorToHexString(ThemeUtils.primaryColor()),
getString(R.string.translation_link))));
getString(R.string.translation_link),
getString(R.string.participate_contribute_translate_translate)) + " " +
getString(R.string.participate_contribute_translate_text)));
TextView contributeGithubView = (TextView) findViewById(R.id.participate_contribute_github_text);
contributeGithubView.setMovementMethod(LinkMovementMethod.getInstance());
contributeGithubView.setText(Html.fromHtml(
getString(R.string.participate_contribute_github_text,
ThemeUtils.colorToHexString(ThemeUtils.primaryColor()),
getString(R.string.contributing_link))));
getString(R.string.participate_contribute_github_text_link,
ThemeUtils.colorToHexString(ThemeUtils.primaryColor()),
getString(R.string.contributing_link)))));
AppCompatButton reportButton = (AppCompatButton) findViewById(R.id.participate_testing_report);
reportButton.getBackground().setColorFilter(ThemeUtils.primaryColor(), PorterDuff.Mode.SRC_ATOP);

View file

@ -570,10 +570,16 @@
<string name="participate_release_candidate_headline">Release candidate</string>
<string name="participate_release_candidate_text">The release candidate (RC) is a snapshot of the upcoming release and is expected to be stable. Testing your individual setup could help ensure this. Sign up for testing on the Play store or manually look in the \"Version\" section of F-Droid.</string>
<string name="participate_contribute_headline">Actively Contribute</string>
<string name="participate_contribute_irc_text">Join the chat on IRC: &lt;font color=\"%1$s\">&lt;a href=\"%2$s\">#nextcloud-mobile&lt;/a>&lt;/font></string>
<string name="participate_contribute_forum_text">Help others on the &lt;font color=\"%1$s\">&lt;a href=\"%2$s\">forum&lt;/a>&lt;/font></string>
<string name="participate_contribute_translate_text">&lt;font color=\"%1$s\">&lt;a href=\"%2$s\">Translate&lt;/a>&lt;/font> the app</string>
<string name="participate_contribute_github_text">Review, amend and write code, see &lt;font color=\"%1$s\">&lt;a href=\"%2$s\">CONTRIBUTING.md&lt;/a>&lt;/font> for details</string>
<string name="participate_contribute_irc_text">Join the chat on IRC:</string>
<string name="participate_contribute_irc_text_link" translatable="false"> &lt;font color=\"%1$s\">&lt;a href=\"%2$s\">#nextcloud-mobile&lt;/a>&lt;/font></string>
<string name="participate_contribute_forum_text">Help others on the</string>
<string name="participate_contribute_forum_forum">forum</string>
<string name="participate_contribute_forum_text_link" translatable="false">&lt;font color=\"%1$s\">&lt;a href=\"%2$s\">%3$s&lt;/a>&lt;/font></string>
<string name="participate_contribute_translate_translate">Translate</string>
<string name="participate_contribute_translate_text">the app</string>
<string name="participate_contribute_translate_link" translatable="false">&lt;font color=\"%1$s\">&lt;a href=\"%2$s\">%3$s&lt;/a>&lt;/font></string>
<string name="participate_contribute_github_text">Review, amend and write code, see %1$s for details</string>
<string name="participate_contribute_github_text_link" translatable="false">&lt;font color=\"%1$s\">&lt;a href=\"%2$s\">CONTRIBUTING.md&lt;/a>&lt;/font></string>
<string name="move_to">Move to&#8230;</string>
<string name="copy_to">Copy to&#8230;</string>
<string name="choose_remote_folder">Choose folder&#8230;</string>