From f4cca21fdf99f0cdd9be900c9190f7e5f6590828 Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Sun, 17 Apr 2016 07:29:08 -0400 Subject: Recover lost language translation accommodation and doc/context restructuring --- doc/context/admin/security/help.html | 3 --- doc/context/channel/help.html | 24 ------------------------ doc/context/cloud/help.html | 22 ---------------------- doc/context/en/admin/security/help.html | 3 +++ doc/context/en/channel/help.html | 8 ++++++++ doc/context/en/cloud/help.html | 6 ++++++ doc/context/en/mail/help.html | 10 ++++++++++ doc/context/en/network/help.html | 10 ++++++++++ doc/context/en/photos/help.html | 6 ++++++ doc/context/en/profile/help.html | 6 ++++++ doc/context/mail/help.html | 10 ---------- doc/context/network/help.html | 26 -------------------------- doc/context/photos/help.html | 22 ---------------------- doc/context/profile/help.html | 22 ---------------------- mod/help.php | 12 ++++++++++-- 15 files changed, 59 insertions(+), 131 deletions(-) delete mode 100644 doc/context/admin/security/help.html delete mode 100644 doc/context/channel/help.html delete mode 100644 doc/context/cloud/help.html create mode 100644 doc/context/en/admin/security/help.html create mode 100644 doc/context/en/channel/help.html create mode 100644 doc/context/en/cloud/help.html create mode 100644 doc/context/en/mail/help.html create mode 100644 doc/context/en/network/help.html create mode 100644 doc/context/en/photos/help.html create mode 100644 doc/context/en/profile/help.html delete mode 100644 doc/context/mail/help.html delete mode 100644 doc/context/network/help.html delete mode 100644 doc/context/photos/help.html delete mode 100644 doc/context/profile/help.html diff --git a/doc/context/admin/security/help.html b/doc/context/admin/security/help.html deleted file mode 100644 index e9a741a5e..000000000 --- a/doc/context/admin/security/help.html +++ /dev/null @@ -1,3 +0,0 @@ -

Security Settings

-

This page contains various administrator settings related to security.

-

To save any changes you make to these settings, you must press the Submit button.

\ No newline at end of file diff --git a/doc/context/channel/help.html b/doc/context/channel/help.html deleted file mode 100644 index 810913ff3..000000000 --- a/doc/context/channel/help.html +++ /dev/null @@ -1,24 +0,0 @@ - -
-
General
-
This is the home page of a channel. It is similar to someone's profile "wall" in a social network context. Posts created by the channel are displayed according to the observer's viewing permissions.
-
Create a Post
-
If you have permission to create posts on the channel page, then you will see the post editor at the top.
-
Channel Content Tabs
-
The channel content tabs are links to other content published by the channel. The About tab links to the channel profile. The Photos tab links to the channel photo galleries. The Files tab links to the general shared files published by the channel.
-
\ No newline at end of file diff --git a/doc/context/cloud/help.html b/doc/context/cloud/help.html deleted file mode 100644 index 105947517..000000000 --- a/doc/context/cloud/help.html +++ /dev/null @@ -1,22 +0,0 @@ - -
-
General
-
This page displays a channel's "cloud" files. The files visible to the observer depend on the individual file permissions set by the channel owner. If you have permission to create/upload files you will see control buttons above the file list.
-
Channel Content Tabs
-
The channel content tabs are links to other content published by the channel. The About tab links to the channel profile. The Photos tab links to the channel photo galleries. The Files tab links to the general shared files published by the channel.
-
\ No newline at end of file diff --git a/doc/context/en/admin/security/help.html b/doc/context/en/admin/security/help.html new file mode 100644 index 000000000..e9a741a5e --- /dev/null +++ b/doc/context/en/admin/security/help.html @@ -0,0 +1,3 @@ +

Security Settings

+

This page contains various administrator settings related to security.

+

To save any changes you make to these settings, you must press the Submit button.

\ No newline at end of file diff --git a/doc/context/en/channel/help.html b/doc/context/en/channel/help.html new file mode 100644 index 000000000..6e3181cbf --- /dev/null +++ b/doc/context/en/channel/help.html @@ -0,0 +1,8 @@ +
+
General
+
This is the home page of a channel. It is similar to someone's profile "wall" in a social network context. Posts created by the channel are displayed according to the observer's viewing permissions.
+
Create a Post
+
If you have permission to create posts on the channel page, then you will see the post editor at the top.
+
Channel Content Tabs
+
The channel content tabs are links to other content published by the channel. The About tab links to the channel profile. The Photos tab links to the channel photo galleries. The Files tab links to the general shared files published by the channel.
+
\ No newline at end of file diff --git a/doc/context/en/cloud/help.html b/doc/context/en/cloud/help.html new file mode 100644 index 000000000..a8f193223 --- /dev/null +++ b/doc/context/en/cloud/help.html @@ -0,0 +1,6 @@ +
+
General
+
This page displays a channel's "cloud" files. The files visible to the observer depend on the individual file permissions set by the channel owner. If you have permission to create/upload files you will see control buttons above the file list.
+
Channel Content Tabs
+
The channel content tabs are links to other content published by the channel. The About tab links to the channel profile. The Photos tab links to the channel photo galleries. The Files tab links to the general shared files published by the channel.
+
\ No newline at end of file diff --git a/doc/context/en/mail/help.html b/doc/context/en/mail/help.html new file mode 100644 index 000000000..a2361a135 --- /dev/null +++ b/doc/context/en/mail/help.html @@ -0,0 +1,10 @@ +
+
General
+
The messages displayed in private mail are visible only to you and the single recipient.
+
Combined View
+
Complete conversations can be viewed in a continuous thread by selecting Combined View. Available conversations are displayed beneath the menu in the side panel.
+
Inbox/Outbox
+
Individual sent messages are viewed by selecting Outbox, and incoming messages are viewed using the Inbox filter.
+
New Message
+
Individual messages have delivery reports that can be viewed using the drop-down menu. Messages can also be recalled from the same menu, which can prevent the recipient from viewing the message if they have not already read it.
+
\ No newline at end of file diff --git a/doc/context/en/network/help.html b/doc/context/en/network/help.html new file mode 100644 index 000000000..53e993b69 --- /dev/null +++ b/doc/context/en/network/help.html @@ -0,0 +1,10 @@ +
+
General
+
The network page displays a stream of posts and conversations, typically ordered by the most recently updated. This page is highly customizable.
+
Create a Post
+
At the top of the page there is a text box that says "Share". Clicking this box opens a new post editor. The post editor is customizable, but the basic editor provides fields for a post body and an optional post Title. Buttons below the text area to the left provide shortcuts to text formatting and inserting links, images, and other data into the post. The buttons to the right provide a post preview, the post permissions setting, and a Submit button to send the post.
+
Privacy Groups
+
The privacy groups you have created are displayed in the side panel. Selecting them filters posts to those created by channels in the chosen group.
+
Post Permissions
+
The access control list (ACL) is what you use to set who can see your new post. Pressing the ACL button beside the Submit button will display a dialog in which you can select what channels and/or privacy groups can see the post. You can also select who is explicitly denied access. For example, say you are planning a surprise party for a friend. You can send an invitation post to everyone in your Friends group except the friend you are surprising. In this case you "show" the Friends group but "don't show" that one person.
+
\ No newline at end of file diff --git a/doc/context/en/photos/help.html b/doc/context/en/photos/help.html new file mode 100644 index 000000000..78b442bb4 --- /dev/null +++ b/doc/context/en/photos/help.html @@ -0,0 +1,6 @@ +
+
General
+
This page displays a channel's photo albums. The images visible to the observer depend on the individual image permissions.
+
Channel Content Tabs
+
The channel content tabs are links to other content published by the channel. The About tab links to the channel profile. The Photos tab links to the channel photo galleries. The Files tab links to the general shared files published by the channel.
+
\ No newline at end of file diff --git a/doc/context/en/profile/help.html b/doc/context/en/profile/help.html new file mode 100644 index 000000000..563e0df99 --- /dev/null +++ b/doc/context/en/profile/help.html @@ -0,0 +1,6 @@ +
+
General
+
This is the profile page of a channel. It typically displays information describing the channel. If the channel represents a person in a social network, for example, then the profile might provide contact information and other personal details about the person. Channels can have multiple profiles, where the displayed profile depends on the observer.
+
Channel Content Tabs
+
The channel content tabs are links to other content published by the channel. The About tab links to the channel profile. The Photos tab links to the channel photo galleries. The Files tab links to the general shared files published by the channel.
+
\ No newline at end of file diff --git a/doc/context/mail/help.html b/doc/context/mail/help.html deleted file mode 100644 index a2361a135..000000000 --- a/doc/context/mail/help.html +++ /dev/null @@ -1,10 +0,0 @@ -
-
General
-
The messages displayed in private mail are visible only to you and the single recipient.
-
Combined View
-
Complete conversations can be viewed in a continuous thread by selecting Combined View. Available conversations are displayed beneath the menu in the side panel.
-
Inbox/Outbox
-
Individual sent messages are viewed by selecting Outbox, and incoming messages are viewed using the Inbox filter.
-
New Message
-
Individual messages have delivery reports that can be viewed using the drop-down menu. Messages can also be recalled from the same menu, which can prevent the recipient from viewing the message if they have not already read it.
-
\ No newline at end of file diff --git a/doc/context/network/help.html b/doc/context/network/help.html deleted file mode 100644 index 956af7380..000000000 --- a/doc/context/network/help.html +++ /dev/null @@ -1,26 +0,0 @@ - -
-
General
-
The network page displays a stream of posts and conversations, typically ordered by the most recently updated. This page is highly customizable.
-
Create a Post
-
At the top of the page there is a text box that says "Share". Clicking this box opens a new post editor. The post editor is customizable, but the basic editor provides fields for a post body and an optional post Title. Buttons below the text area to the left provide shortcuts to text formatting and inserting links, images, and other data into the post. The buttons to the right provide a post preview, the post permissions setting, and a Submit button to send the post.
-
Privacy Groups
-
The privacy groups you have created are displayed in the side panel. Selecting them filters posts to those created by channels in the chosen group.
-
Post Permissions
-
The access control list (ACL) is what you use to set who can see your new post. Pressing the ACL button beside the Submit button will display a dialog in which you can select what channels and/or privacy groups can see the post. You can also select who is explicitly denied access. For example, say you are planning a surprise party for a friend. You can send an invitation post to everyone in your Friends group except the friend you are surprising. In this case you "show" the Friends group but "don't show" that one person.
-
\ No newline at end of file diff --git a/doc/context/photos/help.html b/doc/context/photos/help.html deleted file mode 100644 index f41611f8d..000000000 --- a/doc/context/photos/help.html +++ /dev/null @@ -1,22 +0,0 @@ - -
-
General
-
This page displays a channel's photo albums. The images visible to the observer depend on the individual image permissions.
-
Channel Content Tabs
-
The channel content tabs are links to other content published by the channel. The About tab links to the channel profile. The Photos tab links to the channel photo galleries. The Files tab links to the general shared files published by the channel.
-
\ No newline at end of file diff --git a/doc/context/profile/help.html b/doc/context/profile/help.html deleted file mode 100644 index 0d4abb8cb..000000000 --- a/doc/context/profile/help.html +++ /dev/null @@ -1,22 +0,0 @@ - -
-
General
-
This is the profile page of a channel. It typically displays information describing the channel. If the channel represents a person in a social network, for example, then the profile might provide contact information and other personal details about the person. Channels can have multiple profiles, where the displayed profile depends on the observer.
-
Channel Content Tabs
-
The channel content tabs are links to other content published by the channel. The About tab links to the channel profile. The Photos tab links to the channel photo galleries. The Files tab links to the general shared files published by the channel.
-
\ No newline at end of file diff --git a/mod/help.php b/mod/help.php index fb0339cd9..8c27156ab 100644 --- a/mod/help.php +++ b/mod/help.php @@ -88,9 +88,17 @@ function load_context_help() { $path = App::$cmd; $args = App::$argv; - + $lang = App::$language; + + if(! isset($lang) || !is_dir('doc/context/' . $lang . '/')) { + $lang = 'en'; + } while($path) { - $context_help = load_doc_file('doc/context/' . $path . '/help.html'); + $context_help = load_doc_file('doc/context/' . $lang . '/' . $path . '/help.html'); + if(!$context_help) { + // Fallback to English if the translation is absent + $context_help = load_doc_file('doc/context/en/' . $path . '/help.html'); + } if($context_help) break; array_pop($args); -- cgit v1.2.3