Enhance refactor commands with controller-aware Route() updates and fix code quality violations
Add semantic token highlighting for 'that' variable and comment file references in VS Code extension Add Phone_Text_Input and Currency_Input components with formatting utilities Implement client widgets, form standardization, and soft delete functionality Add modal scroll lock and update documentation Implement comprehensive modal system with form integration and validation Fix modal component instantiation using jQuery plugin API Implement modal system with responsive sizing, queuing, and validation support Implement form submission with validation, error handling, and loading states Implement country/state selectors with dynamic data loading and Bootstrap styling Revert Rsx::Route() highlighting in Blade/PHP files Target specific PHP scopes for Rsx::Route() highlighting in Blade Expand injection selector for Rsx::Route() highlighting Add custom syntax highlighting for Rsx::Route() and Rsx.Route() calls Update jqhtml packages to v2.2.165 Add bundle path validation for common mistakes (development mode only) Create Ajax_Select_Input widget and Rsx_Reference_Data controller Create Country_Select_Input widget with default country support Initialize Tom Select on Select_Input widgets Add Tom Select bundle for enhanced select dropdowns Implement ISO 3166 geographic data system for country/region selection Implement widget-based form system with disabled state support 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
32
vendor/sokil/php-isocodes/src/TranslationDriver/DummyDriver.php
vendored
Normal file
32
vendor/sokil/php-isocodes/src/TranslationDriver/DummyDriver.php
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Sokil\IsoCodes\TranslationDriver;
|
||||
|
||||
/**
|
||||
* This driver may be used, when localisation of names does not required, and only database of codes is required.
|
||||
*/
|
||||
class DummyDriver implements TranslationDriverInterface
|
||||
{
|
||||
public function configureDirectory(string $isoNumber, string $directory): void
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
public function setLocale(string $locale): void
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $isoNumber
|
||||
* @param string $message
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function translate(string $isoNumber, string $message): string
|
||||
{
|
||||
return $message;
|
||||
}
|
||||
}
|
||||
52
vendor/sokil/php-isocodes/src/TranslationDriver/GettextExtensionDriver.php
vendored
Normal file
52
vendor/sokil/php-isocodes/src/TranslationDriver/GettextExtensionDriver.php
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Sokil\IsoCodes\TranslationDriver;
|
||||
|
||||
class GettextExtensionDriver implements TranslationDriverInterface
|
||||
{
|
||||
public function configureDirectory(string $isoNumber, string $directory): void
|
||||
{
|
||||
// add gettext domain
|
||||
\bindtextdomain(
|
||||
$isoNumber,
|
||||
$directory
|
||||
);
|
||||
|
||||
\bind_textdomain_codeset(
|
||||
$isoNumber,
|
||||
'UTF-8'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Warning: If defined, will configure system locale.
|
||||
*
|
||||
* @param string $locale
|
||||
*/
|
||||
public function setLocale(string $locale): void
|
||||
{
|
||||
$fullLocaleName = sprintf('%s.UTF-8', $locale);
|
||||
|
||||
if (\getenv('LANGUAGE') !== $fullLocaleName) {
|
||||
\putenv(sprintf('LANGUAGE=%s', $fullLocaleName));
|
||||
}
|
||||
|
||||
|
||||
if (\setlocale(LC_MESSAGES, '0') !== $fullLocaleName) {
|
||||
\setlocale(LC_MESSAGES, sprintf('%s.UTF-8', $locale));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $isoNumber
|
||||
* @param string $message
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function translate(string $isoNumber, string $message): string
|
||||
{
|
||||
return \dgettext($isoNumber, $message);
|
||||
}
|
||||
}
|
||||
94
vendor/sokil/php-isocodes/src/TranslationDriver/SymfonyTranslationDriver.php
vendored
Normal file
94
vendor/sokil/php-isocodes/src/TranslationDriver/SymfonyTranslationDriver.php
vendored
Normal file
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Sokil\IsoCodes\TranslationDriver;
|
||||
|
||||
use Symfony\Component\Translation\Loader\MoFileLoader;
|
||||
use Symfony\Component\Translation\Translator;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class SymfonyTranslationDriver implements TranslationDriverInterface
|
||||
{
|
||||
/**
|
||||
* @var Translator
|
||||
*/
|
||||
private $translator;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $locale = 'en';
|
||||
|
||||
/**
|
||||
* @param string|null $cacheDirectory useful only if the given $translator is null.
|
||||
*/
|
||||
public function __construct(?string $cacheDirectory = null, ?TranslatorInterface $translator = null)
|
||||
{
|
||||
$this->translator = $translator ?: new Translator($this->locale, null, $cacheDirectory);
|
||||
$this->translator->addLoader('mo', new MoFileLoader());
|
||||
}
|
||||
|
||||
public function configureDirectory(string $isoNumber, string $directory): void
|
||||
{
|
||||
$locales = [$this->locale];
|
||||
if (strpos($this->locale, '_') === 2) {
|
||||
$locales[] = substr($this->locale, 0, 2);
|
||||
}
|
||||
|
||||
$validPathToMoFile = null;
|
||||
foreach ($locales as $locale) {
|
||||
$pathToMoFile = $this->getPathToMoFile($directory, $locale, $isoNumber);
|
||||
|
||||
if (file_exists($pathToMoFile)) {
|
||||
$validPathToMoFile = $pathToMoFile;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($validPathToMoFile !== null) {
|
||||
$this->translator->addResource(
|
||||
'mo',
|
||||
$validPathToMoFile,
|
||||
$locale,
|
||||
$isoNumber
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private function getPathToMoFile(string $directory, string $locale, string $isoNumber): string
|
||||
{
|
||||
$pathToMoFile = sprintf(
|
||||
'%s/%s/LC_MESSAGES/%s.mo',
|
||||
$directory,
|
||||
$locale,
|
||||
$isoNumber
|
||||
);
|
||||
|
||||
return $pathToMoFile;
|
||||
}
|
||||
|
||||
/**
|
||||
* Warning: If defined, will configure system locale.
|
||||
*
|
||||
* @param string $locale
|
||||
*/
|
||||
public function setLocale(string $locale): void
|
||||
{
|
||||
$this->locale = $locale;
|
||||
|
||||
$this->translator->setLocale($locale);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $isoNumber
|
||||
* @param string $message
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function translate(string $isoNumber, string $message): string
|
||||
{
|
||||
return $this->translator->trans($message, [], $isoNumber);
|
||||
}
|
||||
}
|
||||
15
vendor/sokil/php-isocodes/src/TranslationDriver/TranslationDriverInterface.php
vendored
Normal file
15
vendor/sokil/php-isocodes/src/TranslationDriver/TranslationDriverInterface.php
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Sokil\IsoCodes\TranslationDriver;
|
||||
|
||||
interface TranslationDriverInterface extends TranslatorInterface
|
||||
{
|
||||
public function configureDirectory(string $isoNumber, string $directory): void;
|
||||
|
||||
/**
|
||||
* @param string $locale
|
||||
*/
|
||||
public function setLocale(string $locale): void;
|
||||
}
|
||||
16
vendor/sokil/php-isocodes/src/TranslationDriver/TranslatorInterface.php
vendored
Normal file
16
vendor/sokil/php-isocodes/src/TranslationDriver/TranslatorInterface.php
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Sokil\IsoCodes\TranslationDriver;
|
||||
|
||||
interface TranslatorInterface
|
||||
{
|
||||
/**
|
||||
* @param string $isoNumber
|
||||
* @param string $message
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function translate(string $isoNumber, string $message): string;
|
||||
}
|
||||
Reference in New Issue
Block a user