Prep for Hebrew

This commit is contained in:
David Bomba 2022-07-21 13:20:29 +10:00
parent cd86b690cd
commit 7c500c0247
4 changed files with 74 additions and 4 deletions

View File

@ -109,6 +109,7 @@ class HtmlEngine
$t->replace(Ninja::transformTranslations($this->settings));
$data = [];
//$data['<html>'] = ['value' => '<html dir="rtl">', 'label' => ''];
$data['$global_margin'] = ['value' => '6.35mm', 'label' => ''];
$data['$tax'] = ['value' => '', 'label' => ctrans('texts.tax')];
$data['$app_url'] = ['value' => $this->generateAppUrl(), 'label' => ''];
@ -541,8 +542,8 @@ class HtmlEngine
$data['$payment_url'] = &$data['$payment_link'];
$data['$portalButton'] = &$data['$paymentLink'];
$data['$dir'] = ['value' => optional($this->client->language())->locale === 'ar' ? 'rtl' : 'ltr', 'label' => ''];
$data['$dir_text_align'] = ['value' => optional($this->client->language())->locale === 'ar' ? 'right' : 'left', 'label' => ''];
$data['$dir'] = ['value' => in_array(optional($this->client->language())->locale, ['ar', 'he']) ? 'rtl' : 'ltr', 'label' => ''];
$data['$dir_text_align'] = ['value' => in_array(optional($this->client->language())->locale, ['ar', 'he']) ? 'right' : 'left', 'label' => ''];
$data['$payment.date'] = ['value' => '&nbsp;', 'label' => ctrans('texts.payment_date')];
$data['$method'] = ['value' => '&nbsp;', 'label' => ctrans('texts.method')];

View File

@ -391,8 +391,9 @@ class VendorHtmlEngine
$data['$autoBill'] = ['value' => ctrans('texts.auto_bill_notification_placeholder'), 'label' => ''];
$data['$auto_bill'] = &$data['$autoBill'];
$data['$dir'] = ['value' => optional($this->company->language())->locale === 'ar' ? 'rtl' : 'ltr', 'label' => ''];
$data['$dir_text_align'] = ['value' => optional($this->company->language())->locale === 'ar' ? 'right' : 'left', 'label' => ''];
$data['$dir'] = ['value' => in_array(optional($this->company->language())->locale, ['ar', 'he']) ? 'rtl' : 'ltr', 'label' => ''];
$data['$dir_text_align'] = ['value' => in_array(optional($this->company->language())->locale, ['ar', 'he']) ? 'right' : 'left', 'label' => ''];
$data['$payment.date'] = ['value' => '&nbsp;', 'label' => ctrans('texts.payment_date')];
$data['$method'] = ['value' => '&nbsp;', 'label' => ctrans('texts.method')];

View File

@ -0,0 +1,66 @@
<?php
use App\Models\Language;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddHebrewLanguage extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Language::unguard();
if(!Language::find(33)) {
$serbian = ['id' => 33, 'name' => 'Serbian', 'locale' => 'sr'];
Language::create($serbian);
}
if(!Language::find(34)) {
$slovak = ['id' => 34, 'name' => 'Slovak', 'locale' => 'sk'];
Language::create($slovak);
}
if(!Language::find(35)) {
$estonia = ['id' => 35, 'name' => 'Estonian', 'locale' => 'et'];
Language::create($estonia);
}
if(!Language::find(36)) {
$bulgarian = ['id' => 36, 'name' => 'Bulgarian', 'locale' => 'bg'];
Language::create($bulgarian);
}
if(!Language::find(37)) {
$hebrew = ['id' => 37, 'name' => 'Hebrew', 'locale' => 'he'];
Language::create($hebrew);
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}

View File

@ -4716,6 +4716,8 @@ $LANG = array(
'archive_task_status' => 'Archive Task Status',
'delete_task_status' => 'Delete Task Status',
'restore_task_status' => 'Restore Task Status',
'lang_Hebrew' => 'Hebrew',
);
return $LANG;