From 4240a23a8a9024daab45a277d5df311762d07d49 Mon Sep 17 00:00:00 2001 From: Friendika Date: Mon, 15 Nov 2010 23:27:12 -0800 Subject: [PATCH] i18n re-arrange --- index.php | 12 ++++++++---- mod/notifications.php | 2 ++ view/{ => en}/auto_request.tpl | 0 view/{ => en}/cmnt_received_eml.tpl | 0 view/{ => en}/contact_edit.tpl | 0 view/{ => en}/contact_self.tpl | 0 view/{ => en}/dfrn_req_confirm.tpl | 0 view/{ => en}/dfrn_request.tpl | 0 view/{ => en}/follow_notify_eml.tpl | 0 view/{ => en}/friend_complete_eml.tpl | 0 view/{ => en}/insecure_net.tpl | 0 view/{ => en}/install_db.tpl | 0 view/{ => en}/intro_complete_eml.tpl | 0 view/{ => en}/lostpass.tpl | 0 view/{ => en}/lostpass_eml.tpl | 0 view/{ => en}/mail_received_eml.tpl | 0 view/{ => en}/passchanged_eml.tpl | 0 view/{ => en}/profile_advanced.php | 0 view/{ => en}/pwdreset.tpl | 0 view/{ => en}/register-link.tpl | 0 view/{ => en}/register_open_eml.tpl | 0 view/{ => en}/register_verify_eml.tpl | 0 view/{ => en}/request_notify_eml.tpl | 0 view/{ => en}/settings.tpl | 0 view/{ => en}/settings_nick_set.tpl | 0 view/{ => en}/settings_nick_subdir.tpl | 0 view/{ => en}/settings_nick_unset.tpl | 0 view/{ => en}/wall_received_eml.tpl | 0 view/intros.tpl | 4 ++-- view/sidenote.tpl | 18 ------------------ 30 files changed, 12 insertions(+), 24 deletions(-) rename view/{ => en}/auto_request.tpl (100%) rename view/{ => en}/cmnt_received_eml.tpl (100%) rename view/{ => en}/contact_edit.tpl (100%) rename view/{ => en}/contact_self.tpl (100%) rename view/{ => en}/dfrn_req_confirm.tpl (100%) rename view/{ => en}/dfrn_request.tpl (100%) rename view/{ => en}/follow_notify_eml.tpl (100%) rename view/{ => en}/friend_complete_eml.tpl (100%) rename view/{ => en}/insecure_net.tpl (100%) rename view/{ => en}/install_db.tpl (100%) rename view/{ => en}/intro_complete_eml.tpl (100%) rename view/{ => en}/lostpass.tpl (100%) rename view/{ => en}/lostpass_eml.tpl (100%) rename view/{ => en}/mail_received_eml.tpl (100%) rename view/{ => en}/passchanged_eml.tpl (100%) rename view/{ => en}/profile_advanced.php (100%) rename view/{ => en}/pwdreset.tpl (100%) rename view/{ => en}/register-link.tpl (100%) rename view/{ => en}/register_open_eml.tpl (100%) rename view/{ => en}/register_verify_eml.tpl (100%) rename view/{ => en}/request_notify_eml.tpl (100%) rename view/{ => en}/settings.tpl (100%) rename view/{ => en}/settings_nick_set.tpl (100%) rename view/{ => en}/settings_nick_subdir.tpl (100%) rename view/{ => en}/settings_nick_unset.tpl (100%) rename view/{ => en}/wall_received_eml.tpl (100%) delete mode 100644 view/sidenote.tpl diff --git a/index.php b/index.php index 91b864df81..cf20d35a29 100644 --- a/index.php +++ b/index.php @@ -123,14 +123,18 @@ $a->page['htmlhead'] = replace_macros($a->page['htmlhead'], array( $page = $a->page; $profile = $a->profile; $lang = get_config('system','language'); +if($lang === false) + $lang = 'en'; header("Content-type: text/html; charset=utf-8"); -$template = "view/" . (($lang) ? $lang . "/" : "") - . ((x($a->page,'template')) ? $a->page['template'] : 'default' ) - . ".php"; +$template = 'view/' . $lang . '/' + . ((x($a->page,'template')) ? $a->page['template'] : 'default' ) . '.php'; -require_once($template); +if(file_exists($template)) + require_once($template); +else + require_once(str_replace($lang . '/', '', $template)); session_write_close(); exit; diff --git a/mod/notifications.php b/mod/notifications.php index 0bd9c6ffc7..2c79781e98 100644 --- a/mod/notifications.php +++ b/mod/notifications.php @@ -104,6 +104,7 @@ function notifications_content(&$a) { $o .= replace_macros($tpl,array( + '$str_notifytype' => t('Notification type: '), '$notify_type' => (($rr['network'] === 'dfrn') ? t('Friend/Connect Request') : t('New Follower')), '$dfrn_text' => $dfrn_text, '$dfrn_id' => $rr['issued-id'], @@ -114,6 +115,7 @@ function notifications_content(&$a) { '$fullname' => $rr['name'], '$url' => $rr['url'], '$knowyou' => $knowyou, + '$approve' => t('Approve'), '$note' => $rr['note'] )); } diff --git a/view/auto_request.tpl b/view/en/auto_request.tpl similarity index 100% rename from view/auto_request.tpl rename to view/en/auto_request.tpl diff --git a/view/cmnt_received_eml.tpl b/view/en/cmnt_received_eml.tpl similarity index 100% rename from view/cmnt_received_eml.tpl rename to view/en/cmnt_received_eml.tpl diff --git a/view/contact_edit.tpl b/view/en/contact_edit.tpl similarity index 100% rename from view/contact_edit.tpl rename to view/en/contact_edit.tpl diff --git a/view/contact_self.tpl b/view/en/contact_self.tpl similarity index 100% rename from view/contact_self.tpl rename to view/en/contact_self.tpl diff --git a/view/dfrn_req_confirm.tpl b/view/en/dfrn_req_confirm.tpl similarity index 100% rename from view/dfrn_req_confirm.tpl rename to view/en/dfrn_req_confirm.tpl diff --git a/view/dfrn_request.tpl b/view/en/dfrn_request.tpl similarity index 100% rename from view/dfrn_request.tpl rename to view/en/dfrn_request.tpl diff --git a/view/follow_notify_eml.tpl b/view/en/follow_notify_eml.tpl similarity index 100% rename from view/follow_notify_eml.tpl rename to view/en/follow_notify_eml.tpl diff --git a/view/friend_complete_eml.tpl b/view/en/friend_complete_eml.tpl similarity index 100% rename from view/friend_complete_eml.tpl rename to view/en/friend_complete_eml.tpl diff --git a/view/insecure_net.tpl b/view/en/insecure_net.tpl similarity index 100% rename from view/insecure_net.tpl rename to view/en/insecure_net.tpl diff --git a/view/install_db.tpl b/view/en/install_db.tpl similarity index 100% rename from view/install_db.tpl rename to view/en/install_db.tpl diff --git a/view/intro_complete_eml.tpl b/view/en/intro_complete_eml.tpl similarity index 100% rename from view/intro_complete_eml.tpl rename to view/en/intro_complete_eml.tpl diff --git a/view/lostpass.tpl b/view/en/lostpass.tpl similarity index 100% rename from view/lostpass.tpl rename to view/en/lostpass.tpl diff --git a/view/lostpass_eml.tpl b/view/en/lostpass_eml.tpl similarity index 100% rename from view/lostpass_eml.tpl rename to view/en/lostpass_eml.tpl diff --git a/view/mail_received_eml.tpl b/view/en/mail_received_eml.tpl similarity index 100% rename from view/mail_received_eml.tpl rename to view/en/mail_received_eml.tpl diff --git a/view/passchanged_eml.tpl b/view/en/passchanged_eml.tpl similarity index 100% rename from view/passchanged_eml.tpl rename to view/en/passchanged_eml.tpl diff --git a/view/profile_advanced.php b/view/en/profile_advanced.php similarity index 100% rename from view/profile_advanced.php rename to view/en/profile_advanced.php diff --git a/view/pwdreset.tpl b/view/en/pwdreset.tpl similarity index 100% rename from view/pwdreset.tpl rename to view/en/pwdreset.tpl diff --git a/view/register-link.tpl b/view/en/register-link.tpl similarity index 100% rename from view/register-link.tpl rename to view/en/register-link.tpl diff --git a/view/register_open_eml.tpl b/view/en/register_open_eml.tpl similarity index 100% rename from view/register_open_eml.tpl rename to view/en/register_open_eml.tpl diff --git a/view/register_verify_eml.tpl b/view/en/register_verify_eml.tpl similarity index 100% rename from view/register_verify_eml.tpl rename to view/en/register_verify_eml.tpl diff --git a/view/request_notify_eml.tpl b/view/en/request_notify_eml.tpl similarity index 100% rename from view/request_notify_eml.tpl rename to view/en/request_notify_eml.tpl diff --git a/view/settings.tpl b/view/en/settings.tpl similarity index 100% rename from view/settings.tpl rename to view/en/settings.tpl diff --git a/view/settings_nick_set.tpl b/view/en/settings_nick_set.tpl similarity index 100% rename from view/settings_nick_set.tpl rename to view/en/settings_nick_set.tpl diff --git a/view/settings_nick_subdir.tpl b/view/en/settings_nick_subdir.tpl similarity index 100% rename from view/settings_nick_subdir.tpl rename to view/en/settings_nick_subdir.tpl diff --git a/view/settings_nick_unset.tpl b/view/en/settings_nick_unset.tpl similarity index 100% rename from view/settings_nick_unset.tpl rename to view/en/settings_nick_unset.tpl diff --git a/view/wall_received_eml.tpl b/view/en/wall_received_eml.tpl similarity index 100% rename from view/wall_received_eml.tpl rename to view/en/wall_received_eml.tpl diff --git a/view/intros.tpl b/view/intros.tpl index 30198beb85..f903515ca5 100644 --- a/view/intros.tpl +++ b/view/intros.tpl @@ -1,7 +1,7 @@
-

Notification type: $notify_type

+

$str_notifytype $notify_type

$fullname
fullname
$knowyou
@@ -20,7 +20,7 @@ $dfrn_text - +
diff --git a/view/sidenote.tpl b/view/sidenote.tpl deleted file mode 100644 index 44d34bf2a2..0000000000 --- a/view/sidenote.tpl +++ /dev/null @@ -1,18 +0,0 @@ - -
-

-Write something -

-
- - - - -
-
- - -
-
- -