Code Monkey home page Code Monkey logo

lingo's Introduction

Lingo
Latest Stable Version Total Downloads

A file based translation manager, which unlike other Lang managers don't need a database connection to handle the translation.


Installation

  • composer require ctf0/lingo

  • (Laravel < 5.5) add the service provider

    'providers' => [
        ctf0\Lingo\LingoServiceProvider::class,
    ]
  • publish the package assets with

    php artisan vendor:publish --provider="ctf0\Lingo\LingoServiceProvider"

  • after installation, run php artisan lingo:setup to add

    • package routes to routes/web.php
    • package assets compiling to webpack.mix.js
  • install dependencies

    yarn add vue vue-ls vue-notif vue-clipboard2 vue-tippy@v2 vue-awesome@v2 axios fuse.js
  • add this one liner to your main js file and run npm run watch to compile your js/css files.

    • if you are having issues Check
    // app.js
    
    window.Vue = require('vue')
    
    require('../vendor/Lingo/js/manager')
    
    new Vue({
        el: '#app'
    })

Features

  • filter by keys.
  • sort table by keys or by values.
  • add/remove "vendor/locale/file/item".
  • show guiding steps while adding new vendor for better UX.
  • validate for "vendor/locale/file" existence on the fly.
  • use localStorage to remember opened "tab/vendor/files/copy-format".
  • support up to 3 levels deep on nested keys.
  • support all laravel translation key formats.
  • directly copy translation key along with placeholders through tool-tips
    ex.trans('Vendor::file.key', ['attr'=>'']).
  • copy/paste items from one file to another.
  • merge/destruct multiple items.
  • highlight changed key/value.
  • download vendor/file.
  • show/hide different elements to avoid noise & keep the user focused.
  • shortcuts
operation keyboard
reset search "when focused" esc
hide modal esc

Usage

Demo

  • visit localhost:8000/lingo

Security

If you discover any security-related issues, please email [email protected].

lingo's People

Contributors

ctf0 avatar thefehr 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  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  avatar  avatar

lingo's Issues

After upgrade, the translations are no longer shown

Hello,

First and foremost, thank you for this great library!

Everything worked well, until I updated to the latest version (1.4). I can no longer see the translations. It seems that Vue retrieves the translations correctly, because the counter is updated and correct, but nothing is filled in in the table. The following screenshot illustrates the situation:
screen shot 2018-07-17 at 11 16 10

I have updated the js libs using yarn, re-ran the publish step and ran npm run watch
I do not see any errors in the console, and I have tried to debug the app a bit but I am not experienced in Vue.js so I am stuck. Do you have any idea what might be the issue?

Thanks a lot!

Error while installing

i get this error when i run the composer command:

  include(D:\dev\aticis\resources\lang/vendor/Lingo/en/messages.php): failed to open stream: No such file or dir
  ectory


Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1

i also get this error with npm:

ERROR in ./resources/assets/js/app.js
Module not found: Error: Can't resolve '../../vendor/Lingo/js/manager' in 'D:\dev\aticis\resources\assets\js'
 @ ./resources/assets/js/app.js 3:0-40

Translation keys get deleted

I do not yet know when exactly and why.

But I had it multiple times that Lingo deleted a translation key.
One time it was exactly the translations string that I last edited. But it also (randomly) deletes others.

Installation issues

It seems that the documentation is a bit outdated. Am I right? Tried to follow instructions on a brand new Laravel project and there is a couple of issues. Seems to be related to the namespacing, as it keeps failing to find/compile some files. I'll try to provide more details later as I don't have time right now.

Can you confirm if the documentation is up to date though?

PS: I also have this package installed as I was hoping to make those two work hand in hand together
https://github.com/mcamara/laravel-localization#translated-routes

Not sure if that can be a reason for it to fail though, I don't think it is.

Failed to open stream

Hi, i think there is problem with this package.

If i have EN | DE | FR translations and in FR i don't have auth.php i get this error "resources/lang/fr/auth.php): Failed to open stream: No such file or directory"

Same thing if EN auth.php has
[
'failed' => 'These credentials do not match our records.1',
'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
]
and some other only
[
'failed' => 'These credentials do not match our records.1',
]

Error message: "Undefined array key "throttle""

Thanks,
Ivan

Attribute [setGroupNamespace] does not exist.

Hi, I am trying to configure the package with Laravel 5.4 following the instructions, but I am running into an issue with the setup.

After running the command
php artisan lingo:setup

I am getting the following error:

(1/1) InvalidArgumentException
Attribute [setGroupNamespace] does not exist.

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.