servergrove / translationeditorbundle Goto Github PK
View Code? Open in Web Editor NEWSymfony2 bundle that provides a web based UI editor for translation files
License: MIT License
Symfony2 bundle that provides a web based UI editor for translation files
License: MIT License
Right now all my translations are in files called "messages.locale.yml". The bundle will then only import one file since the indexes are created based only on the filename. It should be feasible to add the bundle name in there as well to ensure that there is no name crash.
I keep running into:
Notice: Undefined offset: 2 in /Users/rdohms/dev/webclusive/caas/vendor/servergrove/translation-editor-bundle/ServerGrove/Bundle/TranslationEditorBundle/Command/ImportCommand.php line 88
This is because this part of the code runs into files that are not translations, so they do not have 2 dots in them. My solution wa to add this before the list command.
if(substr_count($fname, '.') < 2) return;
If my files are formatted like this:
homepage:
title: Welcome
sidebar:
title: Menu
subtitle: Chose something to do
aboutpage:
title: About us
contact: Contact us
Then the bundle will import only 2 keys: homepage
and aboutpage
with values: Array
. Either the import should flatten the file while importing them or it should recursively look for the values.
I trie importing from the FOSUserBundle which has 2 files in multiple locales: i.e FOSUserBundle.en.yml, FOSUserBundle.nl.yml.. and validators.en.yml, validators.nl.yml
When i do the import it finds all these files, but when i access the editor it only shows the last file contents, all languages, but only for this filename.
Is this an issue or am i using it wrong?
I've found today that any existing translations located inside the vendors are not included at the interface.
I believe it would be a common request that the validator messages be translated over.
Is there a specific reason for that?
It is common practice to include the vendor name in the name of a git repository. Doing this allows for multiple vendors to have a TranslationEditorBundle, while a user can still fork all of them. :)
I see you're other bundles already follow a naming scheme like that?
Other than that, interesting bundle!
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.