move string files to hmessages.po and hstrings.php for hubzilla to avoid endless merge conflicts.

This commit is contained in:
redmatrix
2015-09-26 23:44:30 -07:00
parent 15d1a6c937
commit cd2b811555
33 changed files with 134666 additions and 15 deletions
+13 -3
View File
@@ -120,7 +120,11 @@ function load_translation_table($lang, $install = false) {
global $a;
$a->strings = array();
if(file_exists("view/$lang/strings.php")) {
if(file_exists("view/$lang/hstrings.php")) {
include("view/$lang/hstrings.php");
}
elseif(file_exists("view/$lang/strings.php")) {
include("view/$lang/strings.php");
}
@@ -129,7 +133,10 @@ function load_translation_table($lang, $install = false) {
if ($plugins !== false) {
foreach($plugins as $p) {
$name = $p['name'];
if(file_exists("addon/$name/lang/$lang/strings.php")) {
if(file_exists("addon/$name/lang/$lang/hstrings.php")) {
include("addon/$name/lang/$lang/hstrings.php");
}
elseif(file_exists("addon/$name/lang/$lang/strings.php")) {
include("addon/$name/lang/$lang/strings.php");
}
}
@@ -139,7 +146,10 @@ function load_translation_table($lang, $install = false) {
// Allow individual strings to be over-ridden on this site
// Either for the default language or for all languages
if(file_exists("view/local-$lang/strings.php")) {
if(file_exists("view/local-$lang/hstrings.php")) {
include("view/local-$lang/hstrings.php");
}
elseif(file_exists("view/local-$lang/strings.php")) {
include("view/local-$lang/strings.php");
}
}
+2 -2
View File
@@ -1686,14 +1686,14 @@ function mimetype_select($channel_id, $current = 'text/bbcode') {
function lang_selector() {
global $a;
$langs = glob('view/*/strings.php');
$langs = glob('view/*/hstrings.php');
$lang_options = array();
$selected = "";
if(is_array($langs) && count($langs)) {
$langs[] = '';
if(! in_array('view/en/strings.php',$langs))
if(! in_array('view/en/hstrings.php',$langs))
$langs[] = 'view/en/';
asort($langs);
foreach($langs as $l) {
+2 -2
View File
@@ -332,10 +332,10 @@ function admin_page_site(&$a) {
/* Installed langs */
$lang_choices = array();
$langs = glob('view/*/strings.php');
$langs = glob('view/*/hstrings.php');
if(is_array($langs) && count($langs)) {
if(! in_array('view/en/strings.php',$langs))
if(! in_array('view/en/hstrings.php',$langs))
$langs[] = 'view/en/';
asort($langs);
foreach($langs as $l) {
+9170
View File
File diff suppressed because it is too large Load Diff
+2120
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -8,12 +8,12 @@
}
if ($argc!=2) {
print "Usage: ".$argv[0]." <strings.php>\n\n";
print "Usage: ".$argv[0]." <hstrings.php>\n\n";
return;
}
$phpfile = $argv[1];
$pofile = dirname($phpfile)."/messages.po";
$pofile = dirname($phpfile)."/hmessages.po";
if (!file_exists($phpfile)){
print "Unable to find '$phpfile'\n";
+1 -1
View File
@@ -9,7 +9,7 @@ function po2php_run($argv, $argc) {
}
$pofile = $argv[1];
$outfile = dirname($pofile)."/strings.php";
$outfile = dirname($pofile)."/hstrings.php";
if(strstr($outfile,'util'))
$lang = 'en';
+2 -2
View File
@@ -16,12 +16,12 @@ if [ $ADDONMODE ]
then
cd "$FULLPATH/../addon/$ADDONNAME"
mkdir -p "$FULLPATH/../addon/$ADDONNAME/lang/C"
OUTFILE="$FULLPATH/../addon/$ADDONNAME/lang/C/messages.po"
OUTFILE="$FULLPATH/../addon/$ADDONNAME/lang/C/hmessages.po"
FINDSTARTDIR="."
FINDOPTS=
else
cd "$FULLPATH/../view/en/"
OUTFILE="$FULLPATH/messages.po"
OUTFILE="$FULLPATH/hmessages.po"
FINDSTARTDIR="../../"
# skip addon folder
FINDOPTS="-wholename */addon -prune -o"
+3 -3
View File
@@ -67,11 +67,11 @@
echo "String files\n";
echo 'util/strings.php' . "\n";
include_once('util/strings.php');
echo 'util/hstrings.php' . "\n";
include_once('util/hstrings.php');
echo count($a->strings) . ' strings' . "\n";
$files = glob('view/*/strings.php');
$files = glob('view/*/hstrings.php');
foreach($files as $file) {
echo $file . "\n";
+9074
View File
File diff suppressed because it is too large Load Diff
+2148
View File
File diff suppressed because it is too large Load Diff
+4618
View File
File diff suppressed because it is too large Load Diff
+1044
View File
File diff suppressed because it is too large Load Diff
+8769
View File
File diff suppressed because it is too large Load Diff
+2079
View File
File diff suppressed because it is too large Load Diff
+7714
View File
File diff suppressed because it is too large Load Diff
+1771
View File
File diff suppressed because it is too large Load Diff
+9081
View File
File diff suppressed because it is too large Load Diff
+2149
View File
File diff suppressed because it is too large Load Diff
+8034
View File
File diff suppressed because it is too large Load Diff
+1898
View File
File diff suppressed because it is too large Load Diff
+8934
View File
File diff suppressed because it is too large Load Diff
+2118
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+8940
View File
File diff suppressed because it is too large Load Diff
+2124
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+7842
View File
File diff suppressed because it is too large Load Diff
+1865
View File
File diff suppressed because it is too large Load Diff
+8550
View File
File diff suppressed because it is too large Load Diff
+2019
View File
File diff suppressed because it is too large Load Diff