1
0
Fork 0
mirror of https://github.com/gsantner/dandelion synced 2024-11-25 22:02:08 +01:00

Remove markdown from translateable list

This commit is contained in:
Gregor Santner 2016-08-07 23:37:02 +02:00
parent c6e3a60411
commit ac81091cce
8 changed files with 30 additions and 180 deletions

View file

@ -1049,26 +1049,23 @@ public class MainActivity extends AppCompatActivity
break; break;
case R.id.nav_license_help: { case R.id.nav_license_help: {
final CharSequence[] options = {getString(R.string.help_license), getString(R.string.help_help)}; final CharSequence[] options = {getString(R.string.help_license__name), getString(R.string.help_markdown__name)};
new AlertDialog.Builder(MainActivity.this) new AlertDialog.Builder(MainActivity.this)
.setItems(options, new DialogInterface.OnClickListener() { .setItems(options, new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialog, int item) { public void onClick(DialogInterface dialog, int item) {
if (options[item].equals(getString(R.string.help_license))) { if (options[item].equals(getString(R.string.help_license__name))) {
final SpannableString s = new SpannableString(Html.fromHtml(getString(R.string.license_text))); final SpannableString s = new SpannableString(Html.fromHtml(getString(R.string.help_license__content)));
Linkify.addLinks(s, Linkify.WEB_URLS); Linkify.addLinks(s, Linkify.WEB_URLS);
final AlertDialog d = new AlertDialog.Builder(MainActivity.this) final AlertDialog d = new AlertDialog.Builder(MainActivity.this)
.setTitle(R.string.license_title) .setTitle(R.string.help_license__years)
.setMessage(s) .setMessage(s)
.setPositiveButton(android.R.string.yes, null).show(); .setPositiveButton(android.R.string.yes, null).show();
d.show(); d.show();
((TextView) d.findViewById(android.R.id.message)).setMovementMethod(LinkMovementMethod.getInstance()); ((TextView) d.findViewById(android.R.id.message)).setMovementMethod(LinkMovementMethod.getInstance());
} }
if (options[item].equals(getString(R.string.help_help))) { if (options[item].equals(getString(R.string.help_markdown__name))) {
new AlertDialog.Builder(MainActivity.this) Helpers.loadUrlInExternalBrowser(MainActivity.this, getString(R.string.help_markdown__weblink));
.setTitle(R.string.help_help)
.setMessage(Html.fromHtml(getString(R.string.markdown_text)))
.setPositiveButton(android.R.string.yes, null).show();
} }
} }
}).show(); }).show();

View file

@ -19,7 +19,9 @@
package com.github.dfa.diaspora_android.util; package com.github.dfa.diaspora_android.util;
import android.app.Activity; import android.app.Activity;
import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.net.Uri;
import com.github.dfa.diaspora_android.R; import com.github.dfa.diaspora_android.R;
@ -34,4 +36,12 @@ public class Helpers {
from.finish(); from.finish();
} }
} }
public static void loadUrlInExternalBrowser(Context context, String url) {
try {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
context.startActivity(browserIntent);
} catch (Exception ignored) {
}
}
} }

View file

@ -73,72 +73,7 @@
<string name="permission_denied">Berechtigung verweigert.</string> <string name="permission_denied">Berechtigung verweigert.</string>
<string name="permission_granted_try_again">Berechtigung erteilt. Bitte versuche es erneut.</string> <string name="permission_granted_try_again">Berechtigung erteilt. Bitte versuche es erneut.</string>
<!-- License & help (large amount of text) --> <!-- License & help (large amount of text) -->
<string name="help_license">Lizenz</string> <string name="help_license__name">Lizenz</string>
<string name="help_help">Markdown Formatierung</string> <string name="help_markdown__name">Markdown Formatierung</string>
<string name="markdown_text">&lt;i&gt;\"Auf Diaspora* ist es möglich, dass du deinen Text in Nachrichten, Kommentaren und
Unterhaltungen formatierst, indem du ein vereinfachtes Mark-Up-System namens Markdown verwendest. Diese Seite stellt
eine kurze Einleitung dar, um grundlegende Formatierungen anwenden zu können.&lt;/i&gt;&lt;br&gt; &lt;br&gt;
&lt;b&gt;Überschriften&lt;/b&gt;&lt;br&gt;
# das ist eine sehr große Überschrift&lt;br&gt;
## halb so groß wie die oben drüber&lt;br&gt;
### doppelt so groß wie normaler Text&lt;br&gt; &lt;br&gt;
&lt;b&gt;Kursiv und fett&lt;/b&gt;&lt;br&gt;
Kursiv: *Wort* oder _Wort_&lt;br&gt;
Fett: **Wort** oder __Wort__&lt;br&gt;
Fett kursiv: ***Wort*** oder ___Wort___&lt;br&gt; &lt;br&gt;
&lt;b&gt;Aufzählung&lt;/b&gt;&lt;br&gt;
*, + oder - vor jeder Linie die du als Teil der Aufzählung haben willst oder 1., 2., usw. vor jedem
Aufzählungspunkt.&lt;br&gt; &lt;br&gt;
&lt;b&gt;Zitat&lt;/b&gt;&lt;br&gt;
Wenn du einen Teil eines Artikels oder eines anderen Kommentares zitieren willst, kannst du deinen Text bequem formatieren,
indem du die Zeile oder den Abschnitt mit einem &gt; Zeichen beginnst.&lt;br&gt; &lt;br&gt;
&lt;b&gt;Horizontale Linie&lt;/b&gt;&lt;br&gt;
Um eine horizontale Linie zu erstellen benutzt du mindestens drei - - -, _ _ _ oder * * * in einer separaten Linie.
Jede größere Anzahl bewirkt dasselbe und Leerzeichen zwischen den Zeichen stören nicht.&lt;br&gt; &lt;br&gt;
&lt;b&gt;Inline Link&lt;/b&gt;&lt;br&gt;
[angezeigter Text hier](http://link.addresse.hier \"alt text\") Der \'alt text\' ist optional, und zeigt einen Tool-Tip,
wenn der Curser sich über den Link bewegt.&lt;br&gt; &lt;br&gt;
&lt;b&gt;Externe Bilder&lt;/b&gt;&lt;br&gt;
![Alt text](http://website.com/image.jpg \"optionaler Titel\") Der \'alt text\' in der eckigen Klammer wird angezeigt,
wenn das Bild nicht geladen werden kann. Der optionale Titel zeigt einen Tool-Tip, wenn der Curser sich über den Link bewegt.
Beides ist nützlich aber nicht nötig.&lt;br&gt; &lt;br&gt;
&lt;b&gt;Escape&lt;/b&gt;&lt;br&gt;
Wenn du in deiner Nachricht ein Zeichen benutzen willst, das ebenfalls zur Markdownformatierung verwendet wird, kannst du
verhindern, dass es von Markdown als Formatcode gelesen wird, indem du es \'escapest\'. Um dies zu tun, musst du einen
Backslash vor das Zeichen setzen. Du kannst trotzdem \'diaspora*\' oder \'D*\' schreiben, ohne dass das Sternchen als
formatierender Code gelesen wird!&lt;br&gt; &lt;br&gt;
&lt;b&gt;Sonderzeichen&lt;/b&gt;&lt;br&gt;
Du kannst Symbole und Sonderzeichen nutzen, indem du bestimmte Zeichenfolgen verwendest. Z.B.:&lt;br&gt;
(c) = © ; (r) = ® ; x^2 = x²\"</string>
<string name="license_text">&lt;b&gt;Maintainer:&lt;/b&gt;&lt;br&gt;
• gsantner https://gsantner.github.io&lt;br&gt;
• vanitasvitae https://github.com/vanitasvitae&lt;br&gt; &lt;br&gt;
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses.&lt;br&gt; &lt;br&gt;
&lt;i&gt;Die Bilder des Startbildschirms können auf Flickr gefunden werden:
https://www.flickr.com/photos/129581906@N06/sets/72157651933980136/with/16594947123.
Sie wurden von \"Lydia\" veröffentlicht und stehen unter der cc by-nc-sa Lizenz.&lt;/i&gt;</string>
<!-- Recently added - Please move to right section--> <!-- Recently added - Please move to right section-->
</resources> </resources>

View file

@ -65,61 +65,8 @@
<string name="permission_denied">Permission refusée.</string> <string name="permission_denied">Permission refusée.</string>
<string name="permission_granted_try_again">Permission accordée. Veuillez réessayer.</string> <string name="permission_granted_try_again">Permission accordée. Veuillez réessayer.</string>
<!-- License & help (large amount of text) --> <!-- License & help (large amount of text) -->
<string name="help_license">Licence</string> <string name="help_license__name">Licence</string>
<string name="help_help">Mise en page Markdown</string> <string name="help_markdown__name">Mise en page Markdown</string>
<string name="markdown_text">&lt;i&gt;\"Sur diaspora* il est possible de mettre en forme votre texte des messages de statut, des commentaires et des conversations en utilisant un système de balises simple nommé Markdown. Cette page est une introduction aux codes utilisés pour créer ce formatage..&lt;/i&gt;&lt;br&gt; &lt;br&gt;
&lt;b&gt;En-têtes&lt;/b&gt;&lt;br&gt;
# Ceci est un très grand titre&lt;br&gt;
## Moitié moins grand que le précédent&lt;br&gt;
### Deux fois la taille d\'un texte normal&lt;br&gt; &lt;br&gt;
&lt;b&gt;Italique et gras&lt;/b&gt;&lt;br&gt;
Italiques : *mot* ou _mot_&lt;br&gt;
Gras : **mot** ou __mot__&lt;br&gt;
Gras italique : ***mot*** ou ___mot___&lt;br&gt; &lt;br&gt;
&lt;b&gt;Listes&lt;/b&gt;&lt;br&gt;
*, + ou - au début chaque ligne que vous souhaitez lister ou 1., 2., etc. au début de chaque ligne de la liste&lt;br&gt; &lt;br&gt;
&lt;b&gt;Citation&lt;/b&gt;&lt;br&gt;
Lorsque vous souhaitez citer un extrait d\'un article ou d\'un autre commentaire, vous pouvez formater facilement votre texte en commençant la ligne ou le paragraphe avec le caractère &gt;&lt;br&gt; &lt;br&gt;
&lt;b&gt;Ligne horizontale&lt;/b&gt;&lt;br&gt;
Pour créer une ligne horizontale, utilisez au moins trois ---, ___ ou *** sur une ligne à part. N\'importe quel nombre au-delà de trois aura le même résultat et les espaces entre les caractères n\'ont pas d\'importance.&lt;br&gt; &lt;br&gt;
&lt;b&gt;Liens intégrés&lt;/b&gt;&lt;br&gt;
[texte qui apparaîtra ici](http://lien.adresse.ici \"texte alternatif\") Le \"texte alternatif\" est facultatif et affiché lorsque la souris survole le lien.&lt;br&gt; &lt;br&gt;
&lt;b&gt;Images&lt;/b&gt;&lt;br&gt;
![Texte alternatif](http://siteweb.com/image.jpg \"titre facultatif\") Le texte alternatif entre crochets est affiché si l\'image ne peut pas être chargée et le titre optionnel est affiché lorsque la souris survole l\'image ; les deux sont utiles mais pas essentiels.&lt;br&gt; &lt;br&gt;
&lt;b&gt;Escape&lt;/b&gt;&lt;br&gt;
Si vous voulez inclure dans votre message un caractère aussi utilisé dans le codage Markdown, vous pouvez empêcher qu\'il soit interprété en l\'\"échappant\". Pour cela, placez un backslash (\) devant le caractère. Vous pouvez toutefois écrire \"diaspora*\" ou \"D*\" sans que l\'astérisque devienne un code de formatage !&lt;br&gt; &lt;br&gt;
&lt;b&gt;Caractères spéciaux&lt;/b&gt;&lt;br&gt;
Vous pouvez créez les symboles et autres caractères spéciaux suivants en utilisant une combinaison de caractères :&lt;br&gt;
(c) = © ; (r) = ® ; x^2 = x²\"</string>
<string name="license_text">&lt;b&gt;Mainteneur :&lt;/b&gt;&lt;br&gt;
• gsantner https://gsantner.github.io&lt;br&gt;
• vanitasvitae https://github.com/vanitasvitae&lt;br&gt; &lt;br&gt;
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses.&lt;br&gt; &lt;br&gt;
&lt;i&gt;The splashscreen images can be found on flickr:
https://www.flickr.com/photos/129581906@N06/sets/72157651933980136/with/16594947123.
They were published by \"Lydia\" and are licensed under cc by-nc-sa.&lt;/i&gt;</string>
<!-- Recently added - Please move to right section--> <!-- Recently added - Please move to right section-->
</resources> </resources>

View file

@ -63,7 +63,7 @@
<string name="permission_denied">Permissão negada.</string> <string name="permission_denied">Permissão negada.</string>
<string name="permission_granted_try_again">Permissão concedida. Por favor, tente novamente.</string> <string name="permission_granted_try_again">Permissão concedida. Por favor, tente novamente.</string>
<!-- License & help (large amount of text) --> <!-- License & help (large amount of text) -->
<string name="help_license">Licença</string> <string name="help_license__name">Licença</string>
<string name="help_help">Formatação de markdown</string> <string name="help_markdown__name">Formatação de markdown</string>
<!-- Recently added - Please move to right section--> <!-- Recently added - Please move to right section-->
</resources> </resources>

View file

@ -64,7 +64,7 @@
<string name="permission_denied">В разрешении отказано.</string> <string name="permission_denied">В разрешении отказано.</string>
<string name="permission_granted_try_again">Разрешение получено. Пожалуйста, попробуйте еще раз.</string> <string name="permission_granted_try_again">Разрешение получено. Пожалуйста, попробуйте еще раз.</string>
<!-- License & help (large amount of text) --> <!-- License & help (large amount of text) -->
<string name="help_license">Лицензия</string> <string name="help_license__name">Лицензия</string>
<string name="help_help">Форматирование Markdown</string> <string name="help_markdown__name">Форматирование Markdown</string>
<!-- Recently added - Please move to right section--> <!-- Recently added - Please move to right section-->
</resources> </resources>

View file

@ -105,50 +105,11 @@
<!-- License & help (large amount of text) --> <!-- License & help (large amount of text) -->
<string name="help_license">License</string> <string name="help_markdown__name">Markdown formating</string>
<string name="help_help">Markdown formating</string> <string name="help_markdown__weblink" translatable="false">https://wiki.diasporafoundation.org/Markdown_reference_guide</string>
<string name="license_title" translatable="false">Copyright © 20152016</string> <string name="help_license__name">License</string>
<string name="help_license__years" translatable="false">Copyright © 20152016</string>
<string name="markdown_text">&lt;i>"On diaspora* it's possible to format your text in status messages, comments <string name="help_license__content" translatable="false">&lt;b>Maintainers:&lt;/b>&lt;br>
and conversations using a simplified mark-up system called Markdown. This page gives an introduction to the
codes used to create this formatting.&lt;/i>&lt;br> &lt;br>
&lt;b>Heading&lt;/b>&lt;br>
# This is an extremely large header&lt;br>
## Half as big as the one above&lt;br>
### Twice the size of normal text&lt;br> &lt;br>
&lt;b>Italics and bold&lt;/b>&lt;br>
Italics: *word* or _word_&lt;br>
Bold: **word** or __word__&lt;br>
Bold italics: ***word*** or ___word___&lt;br> &lt;br>
&lt;b>Bulleted list&lt;/b>&lt;br>
*, + or - in front of each line you want as part of the list or 1., 2., etc. in front of the list items&lt;br> &lt;br>
&lt;b>Quotation&lt;/b>&lt;br>
When you want to quote an extract of an article or another comment, you can conveniently format your text by starting the
line or the paragraph by the > character&lt;br> &lt;br>
&lt;b>Horizontal line&lt;/b>&lt;br>
To create a horizontal line, use at least three - - -, _ _ _ or * * * on a separate line. Any number above three will do
the same thing and spaces between the characters do not matter.&lt;br> &lt;br>
&lt;b>Inline link&lt;/b>&lt;br>
[displayed text here](http://link.address.here \"alt text\") The 'alt text' is optional, and is displayed as a tool-tip
when the cursor is moved over the link.&lt;br> &lt;br>
&lt;b>External images&lt;/b>&lt;br>
![Alt text](http://website.com/image.jpg \"optional title\") The alternative text in the square brackets is displayed if the image cannot be loaded, and the optional title is displayed as a tool-tip when the cursor is moved over the image; both are useful but not essential.&lt;br> &lt;br>
&lt;b>Escape&lt;/b>&lt;br>
If you want your message to include a character which is also used in Markdown coding, you can prevent it from being read by Markdown as a formatting code by 'escaping' it. To do this, place a backslash in front of the character. You can, however, type 'diaspora*' or 'D*' without the asterisk becoming a formatting code!&lt;br> &lt;br>
&lt;b>Special characters&lt;/b>&lt;br>
You can create the following symbols and other special characters using a combination of characters:&lt;br>
(c) = © ; (r) = ® ; x^2 = x²"</string>
<string name="license_text">&lt;b>Maintainers:&lt;/b>&lt;br>
&#8226; gsantner https://gsantner.github.io&lt;br> &#8226; gsantner https://gsantner.github.io&lt;br>
&#8226; vanitasvitae https://github.com/vanitasvitae&lt;br> &lt;br> &#8226; vanitasvitae https://github.com/vanitasvitae&lt;br> &lt;br>

View file

@ -13,7 +13,7 @@
android:title="@string/pref_title__font_size"/> android:title="@string/pref_title__font_size"/>
<CheckBoxPreference <CheckBoxPreference
android:defaultValue="true" android:defaultValue="false"
android:key="@string/pref_key__intellihide_toolbars" android:key="@string/pref_key__intellihide_toolbars"
android:summary="@string/pref_desc__intellihide_toolbars" android:summary="@string/pref_desc__intellihide_toolbars"
android:title="@string/pref_title__intellihide_toolbars"/> android:title="@string/pref_title__intellihide_toolbars"/>