Improve Multilanguage Support (#179)

* Add Arabic Translation

* add some keywords and handling Fixed keywords [untranslated]

* add new translation words

* improve existing translation words
This commit is contained in:
elhoussam 2019-07-23 06:10:26 +02:00 committed by Prasath Mani
parent ea29092aea
commit 8d40ebcdd7
2 changed files with 24 additions and 13 deletions

View file

@ -1,6 +1,6 @@
<?php
//Default Configuration
$CONFIG = '{"lang":"en","error_reporting":false,"show_hidden":false}';
$CONFIG = '{"lang":"Ar","error_reporting":false,"show_hidden":false}';
/**
* H3K | Tiny File Manager V2.3.6
@ -1266,11 +1266,11 @@ if (isset($_GET['help'])) {
<div class="col-xs-12 col-sm-6">
<div class="card">
<ul class="list-group list-group-flush">
<li class="list-group-item"><a href="https://tinyfilemanager.github.io/" target="_blank"><i class="fa fa-question-circle"></i> Help Documents</a> </li>
<li class="list-group-item"><a href="https://github.com/prasathmani/tinyfilemanager/issues" target="_blank"><i class="fa fa-bug"></i> Report Issue</a></li>
<li class="list-group-item"><a href="javascript:latest_release_info('<?php echo VERSION; ?>');" target="_blank"><i class="fa fa-link"></i> Check Latest Version</a></li>
<li class="list-group-item"><a href="https://tinyfilemanager.github.io/" target="_blank"><i class="fa fa-question-circle"></i> <?php echo lng('Help Documents') ?> </a> </li>
<li class="list-group-item"><a href="https://github.com/prasathmani/tinyfilemanager/issues" target="_blank"><i class="fa fa-bug"></i><?php echo lng('Report Issue') ?></a></li>
<li class="list-group-item"><a href="javascript:latest_release_info('<?php echo VERSION; ?>');" target="_blank"><i class="fa fa-link"></i><?php echo lng('Check Latest Version') ?></a></li>
<?php if(!FM_READONLY) { ?>
<li class="list-group-item"><a href="javascript:show_new_pwd();" target="_blank"><i class="fa fa-lock"></i> Generate new password hash</a></li>
<li class="list-group-item"><a href="javascript:show_new_pwd();" target="_blank"><i class="fa fa-lock"></i><?php echo lng('Generate new password hash') ?></a></li>
<?php } ?>
</ul>
</div>
@ -1281,13 +1281,13 @@ if (isset($_GET['help'])) {
<form class="form-inline" onsubmit="return new_password_hash(this)" method="POST" action="">
<input type="hidden" name="type" value="pwdhash" aria-label="hidden" aria-hidden="true">
<div class="form-group mb-2">
<label for="staticEmail2">Generate new password hash</label>
<label for="staticEmail2"><?php echo lng('Generate new password hash') ?></label>
</div>
<div class="form-group mx-sm-3 mb-2">
<label for="inputPassword2" class="sr-only">Password</label>
<label for="inputPassword2" class="sr-only"><?php echo lng('Password') ?></label>
<input type="text" class="form-control btn-sm" id="inputPassword2" name="inputPassword2" placeholder="Password" required>
</div>
<button type="submit" class="btn btn-success btn-sm mb-2">Generate</button>
<button type="submit" class="btn btn-success btn-sm mb-2"><?php echo lng('Generate') ?></button>
</form>
<textarea class="form-control" rows="2" readonly id="js-pwd-result"></textarea>
</div>
@ -3617,6 +3617,12 @@ function lng($txt) {
$tr['en']['Settings'] = 'Settings'; $tr['en']['Language'] = 'Language';
$tr['en']['MemoryUsed'] = 'Memory used'; $tr['en']['PartitionSize'] = 'Partition size';
$tr['en']['ErrorReporting'] = 'Error Reporting'; $tr['en']['ShowHiddenFiles'] = 'Show Hidden Files';
$tr['en']['Full size'] = 'Full size'; $tr['en']['Help'] = 'Help';
$tr['en']['Free of'] = 'Free of'; $tr['en']['Preview'] = 'Preview';
$tr['en']['Help Documents'] = 'Help Documents'; $tr['en']['Report Issue'] = 'Report Issue';
$tr['en']['Generate'] = 'Generate'; $tr['en']['Generate new password hash'] = 'Generate new password hash';
$tr['en']['Check Latest Version']= 'Check Latest Version';
$i18n = fm_get_translations($tr);
$tr = $i18n ? $i18n : $tr;

View file

@ -944,14 +944,19 @@
"Language": "لغة",
"MemoryUsed": "الذاكرة المستخدمة",
"PartitionSize": "حجم القسم",
"Free of": "مساحة فارغة من ",
"Free of": "مساحة فارغة من ",
"Preview": "عرض",
"Full size": "الحجم الكلي",
"ErrorReporting": "التبليغ باخطاء",
"ErrorReporting": "التبليغ باخطاء",
"ShowHiddenFiles": "اظهار الملفات المخفية",
"Help": "مساعدة"
"Help": "مساعدة",
"Generate": "توليد",
"Report Issue": "التبليغ بمشكلة",
"Generate new password hash": "توليد هاش لكلمة المرور",
"Help Documents": "وثائق المساعدة",
"Check Latest Version": "تفقد آخر الاصدارات"
}
}
]