Skip to content

Commit

Permalink
fix: remove forced translation
Browse files Browse the repository at this point in the history
  • Loading branch information
Edward Mungai committed May 25, 2020
1 parent 46edfee commit 9451732
Show file tree
Hide file tree
Showing 36 changed files with 93 additions and 89 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.0.1 - 2020-05-25

- Remove forced ugtext translation

## 2.0.0 - 2020-05-25

- DB table prefixes defined in configuration file
Expand Down
88 changes: 44 additions & 44 deletions config/ifrs.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,80 +87,80 @@
*/
'accounts' => [
//Balance Sheet: Assets Accounts
Account::NON_CURRENT_ASSET => _("Non Current Asset"),
Account::CONTRA_ASSET => _("Contra Asset"),
Account::INVENTORY => _("Inventory"),
Account::BANK => _("Bank"),
Account::CURRENT_ASSET => _("Current Asset"),
Account::RECEIVABLE => _("Receivable"),
Account::NON_CURRENT_ASSET => 'Non Current Asset',
Account::CONTRA_ASSET => 'Contra Asset',
Account::INVENTORY => 'Inventory',
Account::BANK => 'Bank',
Account::CURRENT_ASSET => 'Current Asset',
Account::RECEIVABLE => 'Receivable',

//Balance Sheet: Liabilities Accounts
Account::NON_CURRENT_LIABILITY => _("Non Current Liability"),
Account::CONTROL_ACCOUNT => _("Control Account"),
Account::CURRENT_LIABILITY => _("Current Liability"),
Account::PAYABLE => _("Payable"),
Account::RECONCILIATION => _("Reconciliation"),
Account::NON_CURRENT_LIABILITY => 'Non Current Liability',
Account::CONTROL_ACCOUNT => 'Control Account',
Account::CURRENT_LIABILITY => 'Current Liability',
Account::PAYABLE => 'Payable',
Account::RECONCILIATION => 'Reconciliation',

//Balance Sheet: Equity Accounts
Account::EQUITY => _("Equity"),
Account::EQUITY => 'Equity',

//Income Statement: Operations Accounts
Account::OPERATING_REVENUE => _("Operating Revenue"),
Account::OPERATING_EXPENSE => _("Operating Expense"),
Account::OPERATING_REVENUE => 'Operating Revenue',
Account::OPERATING_EXPENSE => 'Operating Expense',

//Income Statement: Non Operations Accounts
Account::NON_OPERATING_REVENUE => _("Non Operating Revenue"),
Account::DIRECT_EXPENSE => _("Direct Expense"),
Account::OVERHEAD_EXPENSE => _("Overhead Expense"),
Account::OTHER_EXPENSE => _("Other Expense"),
Account::NON_OPERATING_REVENUE => 'Non Operating Revenue',
Account::DIRECT_EXPENSE => 'Direct Expense',
Account::OVERHEAD_EXPENSE => 'Overhead Expense',
Account::OTHER_EXPENSE => 'Other Expense',
],

'transactions' => [
//client transactions
Transaction::CS => _("Cash Sale"),
Transaction::IN => _("Client Invoice"),
Transaction::CN => _("Credit Note"),
Transaction::RC => _("Client Receipt"),
Transaction::CS => 'Cash Sale',
Transaction::IN => 'Client Invoice',
Transaction::CN => 'Credit Note',
Transaction::RC => 'Client Receipt',

//supplier transactions
Transaction::CP => _("Cash Purchase"),
Transaction::BL => _("Supplier Bill"),
Transaction::DN => _("Debit Note"),
Transaction::PY => _("Supplier Payment"),
Transaction::CP => 'Cash Purchase',
Transaction::BL => 'Supplier Bill',
Transaction::DN => 'Debit Note',
Transaction::PY => 'Supplier Payment',

//internal transactions
Transaction::CE => _("Contra Entry"),
Transaction::JN => _("Journal Entry"),
Transaction::CE => 'Contra Entry',
Transaction::JN => 'Journal Entry',
],

'statements' => [
// Income statement
IncomeStatement::TITLE => _("Income Statement"),
IncomeStatement::OPERATING_REVENUES => _("Operating Revenues"),
IncomeStatement::NON_OPERATING_REVENUES => _("Non Operating Revenues"),
IncomeStatement::OPERATING_EXPENSES => _("Operating Expenses"),
IncomeStatement::NON_OPERATING_EXPENSES => _("Non Operating Expenses"),
IncomeStatement::TITLE => 'Income Statement',
IncomeStatement::OPERATING_REVENUES => 'Operating Revenues',
IncomeStatement::NON_OPERATING_REVENUES => 'Non Operating Revenues',
IncomeStatement::OPERATING_EXPENSES => 'Operating Expenses',
IncomeStatement::NON_OPERATING_EXPENSES => 'Non Operating Expenses',

// Balance Sheet
BalanceSheet::TITLE => _("Balance Sheet"),
BalanceSheet::ASSETS => _("Assets"),
BalanceSheet::LIABILITIES => _("Liabilities"),
BalanceSheet::EQUITY => _("Equity"),
BalanceSheet::RECONCILIATION => _("Reconciliation"),
BalanceSheet::TITLE => 'Balance Sheet',
BalanceSheet::ASSETS => 'Assets',
BalanceSheet::LIABILITIES => 'Liabilities',
BalanceSheet::EQUITY => 'Equity',
BalanceSheet::RECONCILIATION => 'Reconciliation',

// Trial Balance
BalanceSheet::TITLE => _("Trial Balance"),
BalanceSheet::TITLE => 'Trial Balance',
],

'balances' => [
Balance::DEBIT => _('Debit'),
Balance::CREDIT => _('Credit'),
Balance::DEBIT => 'Debit',
Balance::CREDIT => 'Credit',
],

'reporting_period_status' => [
ReportingPeriod::OPEN => _('Open'),
ReportingPeriod::CLOSED => _('Closed'),
ReportingPeriod::ADJUSTING => _('Adjusting'),
ReportingPeriod::OPEN => 'Open',
ReportingPeriod::CLOSED => 'Closed',
ReportingPeriod::ADJUSTING => 'Adjusting',
],

/*
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/AdjustingReportingPeriod.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class AdjustingReportingPeriod extends IFRSException
public function __construct(string $message = null, int $code = null)
{
$type = Transaction::getType(Transaction::JN);
$error = _("Only ".$type." Transactions can be posted to a reporting period whose status is ".ReportingPeriod::ADJUSTING);
$error = "Only ".$type." Transactions can be posted to a reporting period whose status is ".ReportingPeriod::ADJUSTING;

Log::notice(
$error.$message,
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/ClosedReportingPeriod.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ClosedReportingPeriod extends IFRSException
*/
public function __construct(int $year, string $message = null, int $code = null)
{
$error = _("Transaction cannot be saved because the Reporting Period for ".$year." is closed ");
$error = "Transaction cannot be saved because the Reporting Period for ".$year." is closed ";

Log::notice(
$error.$message,
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/HangingClearances.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class HangingClearances extends IFRSException
*/
public function __construct(string $message = null, int $code = null)
{
$error = _("Transaction cannot be deleted because it has been used to to Clear other Transactions ");
$error = "Transaction cannot be deleted because it has been used to to Clear other Transactions ";

Log::notice(
$error.$message,
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/HangingTransactions.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class HangingTransactions extends IFRSException
*/
public function __construct(string $message = null, int $code = null)
{
$error = _("Account cannot be deleted because it has existing transactions in the current Reporting Period ");
$error = "Account cannot be deleted because it has existing transactions in the current Reporting Period ";

Log::notice(
$error.$message,
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/InsufficientBalance.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function __construct(
$transactionType = Transaction::getType($transactionType);
$assignedType = Transaction::getType($assignedType);

$error = $transactionType._(" Transaction does not have sufficient balance to clear ");
$error = $transactionType." Transaction does not have sufficient balance to clear ";
$error .= $amount.' of the '.$assignedType;

Log::notice(
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/InvalidAccountClassBalance.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class InvalidAccountClassBalance extends IFRSException
*/
public function __construct(string $message = null, int $code = null)
{
$error = _("Income Statement Accounts cannot have Opening Balances ");
$error = "Income Statement Accounts cannot have Opening Balances ";

Log::notice(
$error.$message,
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/InvalidAccountType.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function __construct(array $accountTypes, string $message = null, int $co
{
$accountTypes = Account::getTypes($accountTypes);

$error = _("Schedule Account Type must be one of: ").implode(", ", $accountTypes);
$error = "Schedule Account Type must be one of: ".implode(", ", $accountTypes);

Log::notice(
$error.' '.$message,
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/InvalidBalance.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function __construct(array $balanceTypes, string $message = null, int $co
{
$balanceTypes = Balance::getTypes($balanceTypes);

$error = _("Opening Balance Type must be one of: ").implode(", ", $balanceTypes);
$error = "Opening Balance Type must be one of: ".implode(", ", $balanceTypes);

Log::notice(
$error.$message,
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/InvalidBalanceTransaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function __construct(array $transactionTypes, string $message = null, int
{
$transactionTypes = Transaction::getTypes($transactionTypes);

$error = _("Opening Balance Transaction must be one of: ").implode(", ", $transactionTypes);
$error = "Opening Balance Transaction must be one of: ".implode(", ", $transactionTypes);

Log::notice(
$error.$message,
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/InvalidClearanceAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class InvalidClearanceAccount extends IFRSException
*/
public function __construct(string $message = null, int $code = null)
{
$error = _("Assignment and Clearance Main Account must be the same ");
$error = "Assignment and Clearance Main Account must be the same ";

Log::notice(
$error.$message,
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/InvalidClearanceCurrency.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class InvalidClearanceCurrency extends IFRSException
*/
public function __construct(string $message = null, int $code = null)
{
$error = _("Assignment and Clearance Currency must be the same");
$error = "Assignment and Clearance Currency must be the same";
Log::notice(
$error.$message,
[
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/InvalidClearanceEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class InvalidClearanceEntry extends IFRSException
*/
public function __construct(string $message = null, int $code = null)
{
$error = _("Transaction Entry increases the Main Account outstanding balance instead of reducing it ");
$error = "Transaction Entry increases the Main Account outstanding balance instead of reducing it ";

Log::notice(
$error.$message,
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/LineItemAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function __construct(string $transactionType, array $accountTypes, string
$transactionType = Transaction::getType($transactionType);
$accountTypes = Account::getTypes($accountTypes);

$error = $transactionType._(" LineItem Account must be of type ").implode(", ", $accountTypes);
$error = $transactionType." LineItem Account must be of type ".implode(", ", $accountTypes);

Log::notice(
$error.' '.$message,
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/MainAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function __construct(string $transactionType, string $accountType, strin
$transactionType = Transaction::getType($transactionType);
$accountType = Account::getType($accountType);

$error = $transactionType._(" Main Account must be of type ").$accountType;
$error = $transactionType." Main Account must be of type ".$accountType;

Log::notice(
$error.$message,
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/MissingAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class MissingAccount extends IFRSException
*/
public function __construct(string $statementType, string $message = null, int $code = null)
{
$error = $statementType._(" Transactions require an Account ");
$error = $statementType." Transactions require an Account ";

Log::notice(
$error.$message,
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/MissingAccountType.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class MissingAccountType extends IFRSException
*/
public function __construct(string $message = null, int $code = null)
{
$error = _("Account type is Required ");
$error = "Account type is Required ";

Log::notice(
$error.$message,
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/MissingForexAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class MissingForexAccount extends IFRSException
*/
public function __construct(string $message = null, int $code = null)
{
$error = _("A Forex Differences Account is required for Assignment Transactions with different exchange rates");
$error = "A Forex Differences Account is required for Assignment Transactions with different exchange rates";

Log::notice(
$error.$message,
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/MissingLineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class MissingLineItem extends IFRSException
*/
public function __construct(string $message = null, int $code = null)
{
$error = _("A Transaction must have at least one LineItem to be posted ");
$error = "A Transaction must have at least one LineItem to be posted ";

Log::notice(
$error.$message,
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/MissingReportingPeriod.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class MissingReportingPeriod extends IFRSException
*/
public function __construct(string $entity, int $year, string $message = null, int $code = null)
{
$error = _("Entity '". $entity."' has no reporting period defined for the year ").$year." ";
$error = "Entity '". $entity."' has no reporting period defined for the year ".$year." ";

Log::notice(
$error.$message,
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/MissingVatAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class MissingVatAccount extends IFRSException
*/
public function __construct(string $vatName, string $message = null, int $code = null)
{
$error = $vatName._(" LineItem requires a Vat Account");
$error = $vatName." LineItem requires a Vat Account";

Log::notice(
$error.$message,
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/NegativeAmount.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class NegativeAmount extends IFRSException
*/
public function __construct(string $modelType, string $message = null, int $code = null)
{
$error = $modelType._(" Amount cannot be negative ");
$error = $modelType." Amount cannot be negative ";

Log::notice(
$error.$message,
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/OverClearance.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function __construct(string $assignedType, float $amount, string $message
{
$assignedType = Transaction::getType($assignedType);

$error = $assignedType._(" Transaction amount remaining to be cleared is less than ").$amount;
$error = $assignedType." Transaction amount remaining to be cleared is less than ".$amount;

Log::notice(
$error.' '.$message,
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/PostedTransaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class PostedTransaction extends IFRSException
*/
public function __construct(string $action, string $message = null, int $code = null)
{
$error = _("Cannot ".$action." a posted Transaction ");
$error = "Cannot ".$action." a posted Transaction ";

Log::notice(
$error.$message,
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/RedundantTransaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class RedundantTransaction extends IFRSException
*/
public function __construct(string $message = null, int $code = null)
{
$error = _("A Transaction Main Account cannot be one of the Line Item Accounts ");
$error = "A Transaction Main Account cannot be one of the Line Item Accounts ";

Log::notice(
$error.$message,
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/SelfClearance.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class SelfClearance extends IFRSException
*/
public function __construct(string $message = null, int $code = null)
{
$error = _("Transaction cannot be used to clear itself ");
$error = "Transaction cannot be used to clear itself ";

Log::notice(
$error.$message,
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/UnassignableTransaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function __construct(string $transactionType, array $transactionTypes, st
$transactionTypes = Transaction::getTypes($transactionTypes);
$transactionType = Transaction::getType($transactionType);

$error = $transactionType._(" Transaction cannot have assignments. Assignment Transaction must be one of: ");
$error = $transactionType." Transaction cannot have assignments. Assignment Transaction must be one of: ";
$error .= implode(", ", $transactionTypes).' ';

Log::notice(
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/UnauthorizedUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class UnauthorizedUser extends IFRSException
*/
public function __construct(string $message = null, int $code = null)
{
$error = _('You are not Authorized to perform that action ');
$error = 'You are not Authorized to perform that action ';

Log::notice(
$error.$message,
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/UnclearableTransaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function __construct(string $transactionType, array $transactionTypes, st
$transactionTypes = Transaction::getTypes($transactionTypes);
$transactionType = Transaction::getType($transactionType);

$error = $transactionType._(" Transaction cannot be cleared. Transaction to be cleared must be one of: ");
$error = $transactionType." Transaction cannot be cleared. Transaction to be cleared must be one of: ";
$error .= implode(", ", $transactionTypes).' ';

Log::notice(
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/UnpostedAssignment.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class UnpostedAssignment extends IFRSException
*/
public function __construct(string $message = null, int $code = null)
{
$error = _("An Unposted Transaction cannot be Assigned or Cleared");
$error = "An Unposted Transaction cannot be Assigned or Cleared";

Log::notice(
$error.$message,
Expand Down
Loading

0 comments on commit 9451732

Please sign in to comment.