move string files to hmessages.po and hstrings.php for hubzilla to avoid endless merge conflicts.
This commit is contained in:
+13
-3
@@ -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
@@ -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
@@ -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
File diff suppressed because it is too large
Load Diff
+2120
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -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
@@ -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';
|
||||
|
||||
@@ -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
@@ -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";
|
||||
|
||||
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
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
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
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
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
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
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
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
Reference in New Issue
Block a user