]> wagnertech.de Git - timetracker.git/commitdiff
Fixed PDF for Russian language
authorNik Okuntseff <support@anuko.com>
Mon, 7 Mar 2016 06:55:30 +0000 (22:55 -0800)
committerNik Okuntseff <support@anuko.com>
Mon, 7 Mar 2016 06:55:42 +0000 (22:55 -0800)
helvetica in TCPDF displays Russian incorrectly, had to use freeserif instead

27 files changed:
WEB-INF/resources/ca.lang.php
WEB-INF/resources/cs.lang.php
WEB-INF/resources/da.lang.php
WEB-INF/resources/de.lang.php
WEB-INF/resources/es.lang.php
WEB-INF/resources/et.lang.php
WEB-INF/resources/fa.lang.php
WEB-INF/resources/fi.lang.php
WEB-INF/resources/fr.lang.php
WEB-INF/resources/he.lang.php
WEB-INF/resources/hu.lang.php
WEB-INF/resources/it.lang.php
WEB-INF/resources/ja.lang.php
WEB-INF/resources/ko.lang.php
WEB-INF/resources/nl.lang.php
WEB-INF/resources/no.lang.php
WEB-INF/resources/pl.lang.php
WEB-INF/resources/pt.lang.php
WEB-INF/resources/ro.lang.php
WEB-INF/resources/sk.lang.php
WEB-INF/resources/sl.lang.php
WEB-INF/resources/sv.lang.php
WEB-INF/resources/tr.lang.php
WEB-INF/resources/zh-cn.lang.php
WEB-INF/resources/zh-tw.lang.php
WEB-INF/templates/footer.tpl
topdf.php

index 70657b1cc15e381f7aaa7d33691662a48238b7a7..17ab223a9697c4a2e4a9e8e5bee995b9a1612fb2 100644 (file)
@@ -122,6 +122,8 @@ $i18n_key_words = array(
 'label.password' => 'Paraula de pas',
 'label.confirm_password' => 'Confirmar paraula de pas',
 'label.email' => 'e-mail',
+// Translate the following string.
+// 'label.page' => 'Page',
 
 "form.filter.project" => 'Projecte',
 "form.filter.filter" => 'Report favorit',
index 96d7b7d529f495bdbb98b83d72804ad7851017cf..1acdf167f9951b983ff7b0e569b484bfcf0e0ae5 100644 (file)
@@ -122,6 +122,8 @@ $i18n_key_words = array(
 'label.confirm_password' => 'potvrdit heslo',
 // 'label.email' => 'email',
 'label.total' => 'celkem',
+// Translate the following string.
+// 'label.page' => 'Page',
 
 "form.filter.project" => 'projekt',
 "form.filter.filter" => 'oblíbená sestava',
index c6ddba46db8fc963d3bf15ca34fb6a3eb7424a3f..4d4de61eddb48960cc3cda9f1e33d80773143fe8 100644 (file)
@@ -123,6 +123,8 @@ $i18n_key_words = array(
 'label.password' => 'adgangskode',
 'label.confirm_password' => 'gentag adgangskode',
 'label.email' => 'email',
+// Translate the following string.
+// 'label.page' => 'Page',
 
 "form.filter.project" => 'projekt',
 "form.filter.filter" => 'favorit rapport',
index ee6901a547a0ddf1afa3f0e598eee8a91a89e347..fb7cba909c29e0bf6c887fc7a1071ca5e3db09ca 100644 (file)
@@ -182,6 +182,8 @@ $i18n_key_words = array(
 'label.role_manager' => '(Manager)',
 'label.role_comanager' => '(Co-Manager)',
 'label.role_admin' => '(Administrator)',
+// Translate the following string.
+// 'label.page' => 'Page',
 // Labels for plugins (extensions to Time Tracker that provide additional features).
 'label.custom_fields' => 'Benutzerfelder',
 'label.type' => 'Typ',
index e7f886653440bdb2796091f0973bac8fdab99bf8..32cccd63e5a9439a6be3bdba42367331fee99765 100644 (file)
@@ -215,6 +215,8 @@ $i18n_key_words = array(
 'label.role_manager' =>'(manejador)',
 'label.role_comanager' => '(auxiliar del manejador)',
 'label.role_admin' => '(administrador)',
+// Translate the following string.
+// 'label.page' => 'Page',
 // Labels for plugins (extensions to Time Tracker that provide additional features).
 // TODO: translate the following strings.
 // 'label.custom_fields' => 'Custom fields',
index 3d709b22982fdd8cda5ab283a90c0519ef2faa31..1f8cdc546a547d21a29eedb7ef9161939d5d6e7f 100644 (file)
@@ -122,6 +122,8 @@ $i18n_key_words = array(
 'label.confirm_password' => 'kinnita salasõna',
 // 'label.email' => 'email',
 'label.total' => 'kokku',
+// Translate the following string.
+// 'label.page' => 'Page',
 
 "form.filter.project" => 'projekt',
 "form.filter.filter" => 'lemmikraport',
index 5cbfa9e958c8a33fb5ae1a6c339d1abd603db772..c710c22c237c6425636e9e2f88040e5cab6b5c7c 100644 (file)
@@ -191,6 +191,8 @@ $i18n_key_words = array(
 'label.role_manager' => '(مدیر)',
 'label.role_comanager' => '(دستیار مدیر)',
 'label.role_admin' => '(مدیر ارشد)',
+// Translate the following string.
+// 'label.page' => 'Page',
 // Labels for plugins (extensions to Time Tracker that provide additional features).
 'label.custom_fields' => 'فیلدهای سفارشی',
 'label.type' => 'نوع',
index 9315a545212322c8182c9ab6c216ef606722c87f..aebd958cc9d6b1b38b3cd7379f8e70e25b54f08b 100644 (file)
@@ -182,6 +182,8 @@ $i18n_key_words = array(
 'label.role_manager' => '(esimies)',
 'label.role_comanager' => '(apu-esimies)',
 'label.role_admin' => '(ylläpitäjä)',
+// Translate the following string.
+// 'label.page' => 'Page',
 // Labels for plugins (extensions to Time Tracker that provide additional features).
 'label.custom_fields' => 'Omat kentät',
 'label.type' => 'Tyyppi',
index 09f38aa64fc26c86e23ae105a288e25044f9f1ad..06532afe8ccb54ed1f6f9d8d9e2ef407261eec20 100644 (file)
@@ -193,6 +193,8 @@ $i18n_key_words = array(
 'label.role_manager' => '(responsable)',
 'label.role_comanager' => '(co-responsable)',
 'label.role_admin' => '(administrateur)',
+// Translate the following string.
+// 'label.page' => 'Page',
 
 // Labels for plugins (extensions to Time Tracker that provide additional features).
 'label.custom_fields' => 'Champs personalisés',
index 389ac056cff43ed08b7492f9f4f6473e7007a243..0f8019dc6b3ef43216def509e42ef99bdb550cb3 100644 (file)
@@ -194,6 +194,8 @@ $i18n_key_words = array(
 'label.role_manager' => '(מנהל)',
 'label.role_comanager' => '(מנהל משנה)',
 'label.role_admin' => '(מנהל המערכת)',
+// Translate the following string.
+// 'label.page' => 'Page',
 // Labels for plugins (extensions to Time Tracker that provide additional features).
 'label.custom_fields' => 'שדות אישיים',
 'label.type' => 'סוג',
index bc498b82c2f10b71aa3b2b48ed7d69a7da8684f3..7874436e1ee297d2c372322576f6b036bc12ac44 100644 (file)
@@ -119,6 +119,8 @@ $i18n_key_words = array(
 'label.confirm_password' => 'jelszó megerősítése',
 // 'label.email' => 'email',
 'label.total' => 'összesen',
+// Translate the following string.
+// 'label.page' => 'Page',
 
 "form.filter.project" => 'projekt',
 "form.filter.filter" => 'előre definiált riport formátum',
index 1e83f63b61bf145e781ffdfaa2bf71dfee5f977d..b1a1aebf30f12f817ca1b328a5633cfee327e46b 100644 (file)
@@ -121,6 +121,8 @@ $i18n_key_words = array(
 'label.confirm_password' => 'conferma password',
 'label.email' => 'e-mail',
 'label.total' => 'totale',
+// Translate the following string.
+// 'label.page' => 'Page',
 
 "form.filter.project" => 'progetto',
 "form.filter.filter" => 'report preferiti',
index 433494924fca71a513dff1e7ae0771ad789cdd15..5ad541081b1b6bb7e92cc45f1bb5fc35e305a5b7 100644 (file)
@@ -122,6 +122,8 @@ $i18n_key_words = array(
 'label.confirm_password' => 'パスワードの確認',
 'label.email' => 'Eメール',
 'label.total' => '合計',
+// Translate the following string.
+// 'label.page' => 'Page',
 
 "form.filter.project" => 'プロジェクト',
 "form.filter.filter" => 'お気に入りレポート',
index cc50132cc7cea124b8eb3ff05d6b39f48517f8d1..eb8fa82a19d5f30d4a78b956351ad776fe858ee0 100644 (file)
@@ -120,6 +120,8 @@ $i18n_key_words = array(
 'label.confirm_password' => '암호 확인',
 'label.email' => '이메일',
 'label.total' => '합계',
+// Translate the following string.
+// 'label.page' => 'Page',
 
 "form.filter.project" => '프로젝트',
 "form.filter.filter" => '좋아하는 보고서',
index e0352a1d651b21a1ae112f1a939b82970a6be6b1..21903db3eb41542b0ffc9691305d110f6c0ce371 100644 (file)
@@ -182,6 +182,8 @@ $i18n_key_words = array(
 'label.role_manager' => '(manager)',
 'label.role_comanager' => '(co-manager)',
 'label.role_admin' => '(beheerder)',
+// Translate the following string.
+// 'label.page' => 'Page',
 // Labels for plugins (extensions to Time Tracker that provide additional features).
 'label.custom_fields' => 'Eigen velden',
 'label.type' => 'Type',
index ca05af0a4379ed3ad8bfb37a2a8ba679459d34a2..a751b58cbf1e398972206a60194af8e8c8eefe05 100644 (file)
@@ -120,6 +120,8 @@ $i18n_key_words = array(
 'label.confirm_password' => 'Bekreft passord',
 // 'label.email' => 'email',
 'label.total' => 'totalt',
+// Translate the following string.
+// 'label.page' => 'Page',
 
 // TODO: Please check the translation against the current English file as many things are being refactored. For example, many labels have been added after label.email.
 
index 141dcaec61b2f4dcefdabb108e6b28004f0a3b94..b4ece7f7ee7bb77f321205b9ded08c4f427d1e92 100644 (file)
@@ -182,6 +182,8 @@ $i18n_key_words = array(
 'label.role_manager' => '(Manager)',
 'label.role_comanager' => '(Co-manager)',
 'label.role_admin' => '(Administrator)',
+// Translate the following string.
+// 'label.page' => 'Page',
 // Labels for plugins (extensions to Time Tracker that provide additional features).
 'label.custom_fields' => 'Niestandardowe pola',
 'label.type' => 'Rodzaj',
index be9fc0170bcf6627a3fe9ea30649a920ec658a7c..041b91a2bf960ce1ee7928184bd64e4654587de8 100644 (file)
@@ -117,6 +117,8 @@ $i18n_key_words = array(
 'label.password' => 'senha',
 'label.confirm_password' => 'confirme a senha',
 // 'label.email' => 'email',
+// Translate the following string.
+// 'label.page' => 'Page',
 
 // "form.filter.project" => 'project',
 // "form.filter.filter" => 'favorite report',
index b1671cfb507af9fb1686e1ce99212152085f0d43..043ccb4e86a30e90388180a2bdd6a3c273119303 100644 (file)
@@ -122,6 +122,8 @@ $i18n_key_words = array(
 'label.confirm_password' => 'confirma parola',
 // 'label.email' => 'email',
 'label.total' => 'total',
+// Translate the following string.
+// 'label.page' => 'Page',
 
 "form.filter.project" => 'proiect',
 "form.filter.filter" => 'rapoarte favorite',
index 25da52942e488a5556276273ff754a57a4b3671f..0ca2a6a4b0a6f9a2aa99e15a3e6130a4366d3316 100644 (file)
@@ -191,6 +191,8 @@ $i18n_key_words = array(
 'label.role_manager' => '(manažér)',
 'label.role_comanager' => '(spolu-manažér)',
 'label.role_admin' => '(administrátor)',
+// Translate the following string.
+// 'label.page' => 'Page',
 // Labels for plugins (extensions to Time Tracker that provide additional features).
 'label.custom_fields' => 'Vlastné polia',
 'label.type' => 'Typ',
index 389f817204ecfe638558b14a61fbf5a51b6a8aa9..b44cc646f43312aa95ab07d592052c6be2443875 100644 (file)
@@ -116,6 +116,8 @@ $i18n_key_words = array(
 // 'label.confirm_password' => 'confirm password',
 'label.email' => 'email',
 'label.total' => 'total',
+// Translate the following string.
+// 'label.page' => 'Page',
 
 "form.filter.project" => 'projekt',
 "form.filter.filter" => 'favorite report',
index 18a4f79b7b4b3dd9646321063f83e04e980e7005..a6bfa059cd6182674180965e2475bb9252bf5d11 100644 (file)
@@ -122,6 +122,8 @@ $i18n_key_words = array(
 'label.confirm_password' => 'bekräfta lösenord',
 'label.email' => 'e-post',
 'label.total' => 'total',
+// Translate the following string.
+// 'label.page' => 'Page',
 
 "form.filter.project" => 'projekt',
 "form.filter.filter" => 'favorit rapport',
index 5b45df0a7a40c557875b6d7a65e6f58ea1ad1dc5..b397aab52f20639efb3608107dbfcd619f03fb37 100644 (file)
@@ -122,6 +122,8 @@ $i18n_key_words = array(
 'label.confirm_password' => 'parolayı tekrala',
 'label.email' => 'e-posta',
 'label.total' => 'toplam',
+// Translate the following string.
+// 'label.page' => 'Page',
 
 "form.filter.project" => 'proje',
 "form.filter.filter" => 'sık kullanılan rapor',
index ae604cbff7643f7d507fa0af37cae6a2c7356a83..7eaabc2f50c6565dafb281a1caa348a18e2e92d6 100644 (file)
@@ -120,6 +120,8 @@ $i18n_key_words = array(
 'label.confirm_password' => '确认密码',
 'label.email' => '电子邮件',
 'label.total' => '总计',
+// Translate the following string.
+// 'label.page' => 'Page',
 
 "form.filter.project" => '项目',
 "form.filter.filter" => '收藏的报告',
index ddc96d07bd0091a1f4ab6157ade99d6c9fb046a4..6a946dd0a21ff6046de0c383cd51f2619e528eab 100644 (file)
@@ -120,6 +120,8 @@ $i18n_key_words = array(
 'label.confirm_password' => '確認密碼',
 'label.email' => '電子郵件',
 'label.total' => '總計',
+// Translate the following string.
+// 'label.page' => 'Page',
 
 "form.filter.project" => '項目',
 "form.filter.filter" => '收藏的報告',
index b0711e0d95fad125f9ad88592888b20368d3f489..68f3af135680f3feac65a818b01f5e2da58e92d0 100644 (file)
@@ -14,7 +14,7 @@
          <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.9.13.3390 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.9.13.3391 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a>
           </td>
index 744ef4a2a5907aa41effced4aaa76221b9b3da03..7aed32d7dfa25bcb42fb7e7e89fdd81d7521a4ca 100644 (file)
--- a/topdf.php
+++ b/topdf.php
@@ -354,7 +354,7 @@ class MyyPDF extends TCPDF {
     // Position at 15 mm from bottom.
     $this->SetY(-15);
     // Set font.
-    $this->SetFont('helvetica', 'I', 8);
+    $this->SetFont('freeserif', 'I', 8);
     // Print localized page number.
     $this->Cell(0, 10, $this->page_word.' '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');
   }
@@ -369,8 +369,6 @@ if (file_exists('images/'.$user->team_id.'.png'))
 
 // Set page word for the footer.
 $pdf->SetPageWord($i18n->getKey('label.page'));
-// TODO: currently, we have problems rendering PDF in some languages such as Russian (headers, page word).
-// Not sure how to fix it... One option is to switch to mPDF - consider.
 
 // Set document information.
 $pdf->SetCreator(PDF_CREATOR);
@@ -393,8 +391,8 @@ $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
 // Add a page.
 $pdf->AddPage();
 
-// Set font.
-$pdf->SetFont('helvetica', '', 10);
+// Set font (freeserif seems to work for all languages).
+$pdf->SetFont('freeserif', '', 10); // helvetica here does not work for Russian.
 
 // Write HTML.
 $pdf->writeHTML($html, true, false, false, false, '');