aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Willingham <beardyunixer@beardyunixer.com>2014-12-15 15:56:00 +0000
committerThomas Willingham <beardyunixer@beardyunixer.com>2014-12-15 15:56:00 +0000
commit372b7b1405f7d2da71dd073ee995bec685fb419d (patch)
treedbf96c291b33712c7f170a6eda12b8f1929a9234
parent049f08e6ad6d79c06d924e609d2af77a47f0c9c1 (diff)
downloadvolse-hubzilla-372b7b1405f7d2da71dd073ee995bec685fb419d.tar.gz
volse-hubzilla-372b7b1405f7d2da71dd073ee995bec685fb419d.tar.bz2
volse-hubzilla-372b7b1405f7d2da71dd073ee995bec685fb419d.zip
Doco: How to write foreign doco in how to write doco doco.
-rw-r--r--doc/doco.bb8
-rw-r--r--include/network.php5
2 files changed, 11 insertions, 2 deletions
diff --git a/doc/doco.bb b/doc/doco.bb
index 3fd0ee94f..7ca64cfea 100644
--- a/doc/doco.bb
+++ b/doc/doco.bb
@@ -22,4 +22,12 @@ Therefore, if using BBCode, try to make the most of it:
[li]Use baseurl or observer.baseurl tags where appropriate instead of example.com for authenticated viewers.[/li]
[li]Support non-authenticated users with observer=0 tags. We presently do not do this due to historical oversights. This needs adding everywhere[/li]
+[b]Translations[/b]
+
+To translate documentation, or provided documentation in languages other than English:
+[li]Create a directory in doc/ with your two letter country code if it doesn't already exist (eg, doc/de/ for German or doc/fr/ for French)[/li]
+[li]Create a document with the same filename as the English version, but with content in your own language. This allows us to fallback to the English if the translation for a particular page is not provided[/li]
+
+To create documentation that has no equivalent file in English, you can create a new file with a name of your choosing - but you'll also need to provide a localised version of the index page (main.bb in English) to make it accessible from the menu.
+
#include doc/macros/main_footer.bb;
diff --git a/include/network.php b/include/network.php
index db48caf37..ee2a6a59b 100644
--- a/include/network.php
+++ b/include/network.php
@@ -1092,7 +1092,9 @@ function discover_by_webbie($webbie) {
$r = q("select * from xchan where xchan_hash = '%s' limit 1",
dbesc($webbie)
);
- if(! $r) {
+ if($r)
+ return true;
+
$r = q("insert into xchan ( xchan_hash, xchan_guid, xchan_pubkey, xchan_addr, xchan_url, xchan_name, xchan_network, xchan_instance_url, xchan_name_date ) values ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s') ",
dbesc($addr),
dbesc($guid),
@@ -1104,7 +1106,6 @@ function discover_by_webbie($webbie) {
dbesc(z_root()),
dbescdate(datetime_convert())
);
- }
$r = q("select * from hubloc where hubloc_hash = '%s' limit 1",
dbesc($webbie)