hpolthof / laravel-translations-db Goto Github PK
View Code? Open in Web Editor NEWLaravel Translations from Database
Home Page: https://packagist.org/packages/hpolthof/laravel-translations-db
License: GNU General Public License v2.0
Laravel Translations from Database
Home Page: https://packagist.org/packages/hpolthof/laravel-translations-db
License: GNU General Public License v2.0
The above artisan command is failing on Windows because the cleanLocaleDir function in /src/Console/Commands/FetchCommand.php is looking for a forward slash, as opposed to a backslash.
To get my local copy to work, I changed:
protected function cleanLocaleDir($item) {
return str_replace($this->lang_path.'/', '', $item);
}
to
protected function cleanLocaleDir($item) {
return str_replace($this->lang_path.'\\', '', $item);
}
...but you may want to create a more robust solution?
Thanks for the handy tool though. Much appreciated!
Hi,
Can we add Rich editor in translation system.
Hello,
hpolthof/laravel-translations-db version used - 0.5.0
Laravel - 5.3
While upgrading laravel from 5.3 to 5.4, it is giving following error
PHP Fatal error: Class Hpolthof\Translation\DatabaseLoader contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Illuminate\Translation\LoaderInterface::namespaces) in /vendor/hpolthof/laravel-translations-db/src/DatabaseLoader.php on line 6
[Symfony\Component\Debug\Exception\FatalErrorException]
Class Hpolthof\Translation\DatabaseLoader contains 1 abstract method and mu
st therefore be declared abstract or implement the remaining methods (Illum
inate\Translation\LoaderInterface::namespaces)
May I know the fix for it? Also, need fix for laravel 5.5 upgrade.
Thanks.
I installed the translation manager packages as described.
But when I go to .../_translations the DropDowns are empty.
Even when I do "php artisan translation:fetch" it still stays empty.
My standard locale is "de" and my fallback_locale is "en".
Any idea what is going wrong?
Thanks
kay899
when clicking into a textfield which was already translated and you do not want to change it and you leave it, the translation gets deleted because it always updates the field with the value in the textbox. so if the textbox is empty it updates the translation with NULL
[InvalidArgumentException]
Could not find package hpolthof/laravel-translation-db at any version for your minimum-stability (stable). Check the package spelling or your minimum-stability
Then there is no data available 500 Error is displayed
fire() function is renamed to handle() a solution would be to add:
function handle(){ $this->fire(); }
If I run
php artisan vendor:publish --provider='Hpolthof\Translation\ServiceProvider'
I got
Nothing to publish for tag [].
With running php artisan translation:fetch
the Cache should be cleared by the Command.
Otherwise the file based changes will not become visible.
ErrorException · vendor/hpolthof/laravel-translations-db/src/Console/Commands/DumpCommand.php:109
Illegal string offset 'email'
Hello,
I am getting error:
ErrorException in Connection.php line 669:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'en-record-aliquam-erat-volutpat-praesent-quis-nibh-nisl-cras-at-' for key 'translations_locale_group_name_unique' (SQL: insert into translations
(locale
, group
, name
, viewed_at
, updated_at
, created_at
) values (en, record, aliquam-erat-volutpat-praesent-quis-nibh-nisl-cras-at-libero-quam-ut-tincidunt-diam-fusce-aliquet-augue-a-ipsum-ullamcorper-semper-suspendisse-potenti-proin-id-eros-eu-lectus-blandit-suscipit-id-eget-tortor-nulla-augue-purus-molestie-accumsan-ullamcorper-ut-dictum-sit-amet-erat-proin-eu-leo-eros-eu-tincidunt-lorem-donec-sit-amet-mauris-vitae-felis-viverra-tristique-mauris-varius, 2016-03-13 07:33:50, 2016-03-13 07:33:50, 2016-03-13 07:33:50)) (View: /Users/Freel/Desktop/Web/project21.dev/resources/views/blocks/Records.blade.php)
what is funny that i am sure that this value is unique. This error happens when I am entering description. In other words long text. I already tryed to do something like that:
$newvalue = substr(str_slug($value),0,100);
it not helped me at all... anyone have any idea whats the problem?
Currently, running translation:fetch
overwrites translations in the database with the ones present in files.
It'd be nice to have a translation:fetch_new
command that only fetches new keys, but doesn't rewrite values in the database for existing translations.
Would you consider adding a command that only introduces new keys in the database? I could work in a PR if you consider this feature.
Thanks :-)
Hi,
I've truncated most of my translations because of no prefill of previously translated items. I'm not sure If I'm missing something or there is nothing like that?
Basically, my issue is that I've translated ~100 items from one lang file into another language, everything saved and all was working. When I reloaded the page and try to translate from => to (same as 1st try) everything was empty.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.