Coder Social home page Coder Social logo

hpolthof / laravel-translations-db Goto Github PK

View Code? Open in Web Editor NEW
52.0 52.0 37.0 49 KB

Laravel Translations from Database

Home Page: https://packagist.org/packages/hpolthof/laravel-translations-db

License: GNU General Public License v2.0

PHP 77.04% HTML 22.96%

laravel-translations-db's People

Contributors

aayaresko avatar akazorg avatar hpolthof avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

laravel-translations-db's Issues

php artisan translation:fetch failing on Windows

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!

Laravel upgrade 5.4 giving abstract method error

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.

Translation Manager not showing any data

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

Translations go missing when leaving empty field

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

[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

Deprecated: Automatically populating $HTTP_RAW_POST_DATA

This warning route: _translations/items

Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in Unknown on line 0

screenshot on 3 12 2016 at 9 04 12 pm

Clear Cache on translation:fetch

With running php artisan translation:fetch the Cache should be cleared by the Command.
Otherwise the file based changes will not become visible.

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'en-record-aliqua...

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?

[Feature request] Fetch only new items

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 :-)

Prefill previously translated items

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.