Skip to content

Commit

Permalink
Fixed #68
Browse files Browse the repository at this point in the history
  • Loading branch information
getpinga committed Jan 9, 2024
1 parent 6ac35cb commit 7c2e6d4
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 12 deletions.
7 changes: 5 additions & 2 deletions cp/app/Controllers/DomainsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,8 @@ public function createDomain(Request $request, Response $response)
'currencySymbol' => $symbol,
'currencyPosition' => $position,
'registrar' => $registrar,
'launch_phases' => $launch_phases
'launch_phases' => $launch_phases,
'currency' => $currency,
]);
}

Expand Down Expand Up @@ -2084,7 +2085,8 @@ public function renewDomain(Request $request, Response $response, $args)
'maxYears' => $maxYears,
'currentUri' => $uri,
'currencySymbol' => $symbol,
'currencyPosition' => $position
'currencyPosition' => $position,
'currency' => $currency
]);
} else {
// Domain does not exist, redirect to the domains view
Expand Down Expand Up @@ -2719,6 +2721,7 @@ public function requestTransfer(Request $request, Response $response)
'registrars' => $registrars,
'currencySymbol' => $symbol,
'currencyPosition' => $position,
'currency' => $currency
]);
}

Expand Down
39 changes: 39 additions & 0 deletions cp/lang/uk_UA/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,27 @@ msgstr "Вийти"
msgid "Domains"
msgstr "Домени"

msgid "Registrant"
msgstr "Реєстрант"

msgid "Creation Date"
msgstr "Дата створення"

msgid "Expiration Date"
msgstr "Термін дії"

msgid "Status"
msgstr "Статус"

msgid "Actions"
msgstr "Дії"

msgid "No Data"
msgstr "Немає даних"

msgid "Search"
msgstr "Пошук"

msgid "List Domains"
msgstr "Список доменів"

Expand All @@ -34,6 +55,9 @@ msgstr "Перевірте домен"
msgid "Enter the domain name you want to check:"
msgstr "Введіть доменне ім’я, яке потрібно перевірити:"

msgid "Check claims"
msgstr "Перевірте claims"

msgid "Check Availability"
msgstr "Перевірте наявність"

Expand Down Expand Up @@ -61,6 +85,15 @@ msgstr "Додати дані DNSSEC"
msgid "List Applications"
msgstr "Список заяв"

msgid "Applications"
msgstr "Заявки"

msgid "Applicant"
msgstr "Заявник"

msgid "Phase"
msgstr "Фаза"

msgid "Create Application"
msgstr "Створити заявку"

Expand All @@ -70,6 +103,12 @@ msgstr "Трансфери"
msgid "Request Transfer"
msgstr "Запит на перенесення"

msgid "Initiated Date"
msgstr "Дата ініціювання"

msgid "Expiry Date"
msgstr "Термін дії"

msgid "Contacts"
msgstr "Контакти"

Expand Down
6 changes: 3 additions & 3 deletions cp/resources/views/admin/domains/createDomain.twig
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@

<!-- Placeholder for displaying domain price -->
<div class="mb-3" id="domainPriceDisplay" style="display:none;">
<strong>{{ __('Estimated Price') }}: </strong><span id="domainPrice">$0.00</span>
<strong>{{ __('Estimated Price') }}: </strong><span id="domainPrice">{{ currency }} 0.00</span>
</div>

<!-- Fields for 4 contacts with roles -->
Expand Down Expand Up @@ -443,9 +443,9 @@ document.addEventListener("DOMContentLoaded", function() {
function formatPrice(price) {
switch(window.currencyPosition) {
case 'before':
return `${window.currencySymbol}${price.toFixed(2)}`;
return `{{ currency }} ${price.toFixed(2)}`;
case 'after':
return `${price.toFixed(2)} ${window.currencySymbol}`;
return `${price.toFixed(2)} {{ currency }}`;
default:
return price.toFixed(2);
}
Expand Down
6 changes: 3 additions & 3 deletions cp/resources/views/admin/domains/renewDomain.twig
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

<!-- Placeholder for displaying domain price -->
<div class="mb-3" id="domainPriceDisplay" style="display:none;">
<strong>{{ __('Estimated Price') }}: </strong><span id="domainPrice">$0.00</span>
<strong>{{ __('Estimated Price') }}: </strong><span id="domainPrice">{{ currency }} 0.00</span>
</div>
{% else %}
<div class="mb-3">
Expand Down Expand Up @@ -158,9 +158,9 @@ document.addEventListener("DOMContentLoaded", function() {
function formatPrice(price) {
switch(window.currencyPosition) {
case 'before':
return `${window.currencySymbol}${price.toFixed(2)}`;
return `{{ currency }} ${price.toFixed(2)}`;
case 'after':
return `${price.toFixed(2)} ${window.currencySymbol}`;
return `${price.toFixed(2)} {{ currency }}`;
default:
return price.toFixed(2);
}
Expand Down
8 changes: 4 additions & 4 deletions cp/resources/views/admin/domains/requestTransfer.twig
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

{% if registrars and not registrar %}
<div class="form-group mb-3">
<label for="registrarDropdown" class="form-label required">{{ __('Gaining Registrar') }}:</label>
<label for="registrarDropdown" class="form-label required">{{ __('Gaining Registrar') }}</label>
<select id="registrarDropdown" name="registrar" class="form-control">
{% for registrar in registrars %}
<option value="{{ registrar.id }}">{{ registrar.name }}</option>
Expand All @@ -60,7 +60,7 @@

<!-- Placeholder for displaying domain price -->
<div class="mb-3" id="domainPriceDisplay" style="display:none;">
<strong>{{ __('Estimated Price') }}: </strong><span id="domainPrice">$0.00</span>
<strong>{{ __('Estimated Price') }}: </strong><span id="domainPrice">{{ currency }} 0.00</span>
</div>

<div class="mb-3">
Expand Down Expand Up @@ -168,9 +168,9 @@ document.addEventListener("DOMContentLoaded", function() {
function formatPrice(price) {
switch(window.currencyPosition) {
case 'before':
return `${window.currencySymbol}${price.toFixed(2)}`;
return `{{ currency }} ${price.toFixed(2)}`;
case 'after':
return `${price.toFixed(2)} ${window.currencySymbol}`;
return `${price.toFixed(2)} {{ currency }}`;
default:
return price.toFixed(2);
}
Expand Down

0 comments on commit 7c2e6d4

Please sign in to comment.