GithubHelp home page GithubHelp logo

Comments (8)

andrey-helldar avatar andrey-helldar commented on June 3, 2024

Because the project has an original file structure and simply copying it into the project will not make it work. The publisher implements the possibility of publishing translations.

Yes, the publisher does indeed use the dragon-code/support package which has the bcmath dependency as it uses its functionality.

You can easily install this PHP extension by running sudo apt-get install php-bcmath

from lang.

Jimbolino avatar Jimbolino commented on June 3, 2024

you could just symlink the relevant json files right?

thats how we used to do it in previous versions anyway :)

from lang.

andrey-helldar avatar andrey-helldar commented on June 3, 2024

We can't do that because the structure of the files in the package doesn't match the structure of the files in the application.

Our files:

{locale}
  php.json
  php-inline.json
  json.json
  json-inline.json

Our files:

{locale}
  php.json
  php-inline.json
  json.json
  json-inline.json

Application files:

{locale}
  auth.php
  pagination.php
  passwords.php
  validation.php
{locale}.json

In addition, the files from the Lang project contain translations not only of the framework, but also of other Laravel packages. The files contain not just translations from different packages, but also from different versions of the same package.

When installing and updating translations, the publisher determines which of the packages are installed and adds keys to the project only for them.

So no, the symlink won't work.

from lang.

andrey-helldar avatar andrey-helldar commented on June 3, 2024

And answering the very first question from the title, I’ll say that by adding the publisher to the mandatory installation, we thus standardized all our projects. In addition, at the moment there are no other installers for these files, as we are constantly improving the structure of the project and not everyone has time to update it, despite the fact that we release it only when the publisher is definitely working.

PS: I recommend using the laravel-lang/common project.

from lang.

Jimbolino avatar Jimbolino commented on June 3, 2024

I assumed the main reason you switched from php to json was because the default laravel skeleton doesn't include the php file anymore (by default), and they added json support.

But now i've looked more closely at the package, and it does a lot more then what it did before :)
(i've been using this package since the Laravel 4.2 days)

Maybe a bit too late, but a changelog/upgrade guide would have been nice, at least for upgrading between the major versions :)

Thnx for the quick responses 👍

from lang.

andrey-helldar avatar andrey-helldar commented on June 3, 2024

We've had a changelog on the site for a while, but it's mostly about which localizations have been translated. The same information is provided in the release notes on GitHub. We just duplicated it on the site.

As for the upgrade guide, it is quite simple: https://laravel-lang.com/installation/upgrade-guide/

I think we can expand this section of the site soon. The old version of the documentation is still available here: https://github.com/Laravel-Lang/publisher/blob/main/docs/installation/upgrade/index.md

from lang.

Jimbolino avatar Jimbolino commented on June 3, 2024

Yeah, a lot has changed since early versions.
From 1.0 untill 8.0 the advice was to copy over the php files (because i'm lazy i just symlinked the directory 😃 )
In 9.0 and 10.0 this still worked

I guess you had the same problem as i did, but instead of a symlink you wrote a new package to automate the job hehe

from lang.

andrey-helldar avatar andrey-helldar commented on June 3, 2024

Well, I never used symlinks unless they were referring to the storage folder 🙂

And so the Publisher project has existed for 5 years now. I started developing it when the Lang package was called caouecs/laravel-lang and had version 3 in release.

from lang.

Related Issues (20)

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.