Comments (11)
ad. 1) The translate icons are set by Javascript. Do you get any errors in the console?
ad. 2) As far as i remember, this is intended. You need to add the record with the default language first and can then add translations.
from translate.
Yes.
lib.js?2ed94ca141:24 Uncaught Error: Syntax error, unrecognized expression: http://stortemelk3.localhost/beheer/editcontent/paginas/1?_locale=enb.error @ lib.js?2ed94ca141:24b.tokenize @ lib.js?2ed94ca141:24b.select @ lib.js?2ed94ca141:24b @ lib.js?2ed94ca141:24find @ lib.js?2ed94ca141:24fa.fn.init @ lib.js?2ed94ca141:24fa @ lib.js?2ed94ca141:14c.show @ lib.js?2ed94ca141:90(anonymous function) @ lib.js?2ed94ca141:90each @ lib.js?2ed94ca141:14each @ lib.js?2ed94ca141:14b @ lib.js?2ed94ca141:90(anonymous function) @ bolt.js?4c21e560ba:8dispatch @ lib.js?2ed94ca141:25q.handle @ lib.js?2ed94ca141:24
Navigated to http://stortemelk3.localhost/beheer/editcontent/paginas/1?_locale=en
from translate.
- That's intentional for now. Until you have saved it it does not have anywhere to "save" the translations, (I'll try to work around this in the future to allow records to only be in an non-default locale).
- The behavior is changed from setting the items via JS to setting them on the backend via the _locale query string. This is done so that we don't have to write specific js code to load fields (both bolt's own and extension fields) and also because the JS we wrote to load/unload fields was probably the most fragile thing about the 2.0 version simply because it was often fighting with bolt's own JS and the way that bolt's ajax save cycle worked.
Sounds to me like it's working as it should and the lib.js sounds like it might be unrelated since it is not from this extension.
Sorry, missed the part about the translation icons, Could you please post the contenttypes.yml so I can try to reproduce here?
from translate.
The main problem is that the translatable fields won't show up so you can't type text per language.
PS
My posted issues are supposed to help you guys out, not to nag. :)
from translate.
@peterboorsma The issue here is just that while fixing a few other things I changed isTranslateable to is_translateable since it better follows bolt's and YAML's rules about key names that way (I thought it was best to fix all the things that has bothered me in one breaking change when I have to bump major versions anyway). I updated the readme, but forgot to mention it in the issue... :(
Just change isTranslateable to is_translateable and it should work :)
Oh, and I'm very thankful for you trying the extension and posting issue when you run into snags! If you need something in real-time you can also ping me on slack/irc. :)
from translate.
Yes. I used the old "isTranslatable". Updated them now.
But...
(and I am sorry) the translations aren't stored properly. If you toggle back and forth between the languages the translated fields are not saved.
Is it intentional that the page is refreshed in the browser instead of changing the translatable fields 'ajaxy'? Because that's what's happening.
from translate.
@peterboorsma yeah, it's intentional to refresh the browser instead of doing it ajaxy... That way it will be much more compatible and robust. The old way of doing it ajaxy would be much harder to make compatible with extensions and would require us to write js for loading values into every extension fieldtype.
For me (when testing with your contenttype) it seems like DB query result is getting cached... Could you try updating page with translations a few times and see if your translations appear then? Perhaps local extensions do not get their DB queries results cached which would explain why I didn't see this when writing the code...
from translate.
@peterboorsma Or you should be able to disable the cache by adding database: false
to the caching config in config.yml so it looks something like this:
caching:
config: true
templates: true
request: false
duration: 10
authenticated: false
thumbnails: true
database: false
from translate.
I made a copy of my test site on my dev server. Things work fine there so it must be something on my local server. I'll try to figure that out.
from translate.
Problem fixed with dev-master (7fa12c) + Bolt 3..0.10
from translate.
Great :)
from translate.
Related Issues (20)
- Provide a short documentation about "how it works" HOT 1
- [BUG] Changelog is impossible to follow HOT 4
- Change the DB structure - use a table for translation HOT 2
- Arbitrary localized columns for searching
- translatable: true works but translatable: 1 not
- Redirecting homepage to subdomain HOT 1
- [BUG] No language switcher in contenttype when no tabs are present
- [RFC] Make language switcher on contenttype new pages configurable
- [RFC] Twig_Error_Runtime after updating to Translate 4.1.5 HOT 1
- Any page not preceded by '/contenttype' will switch website to default language HOT 1
- [RFC] Translate taxonomies HOT 2
- [BUG] saving with templatefields throws: Warning: Invalid argument supplied for foreach() HOT 1
- [BUG] status update deletes localized contents HOT 1
- Translations are not saved ? Missed a configuration ? HOT 9
- [RFC] Implementing a routing override blacklist
- Redirect ALL urls to default locale HOT 1
- [RFC] Remove /en slug from URL if default language is en_GB
- [BUG] Error when updating php7.2 -> php7.4 (but I found a trick) HOT 1
- [BUG] Composer error
- [BUG] repeater field is set to a row prior when there's no translation being set on the current row
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from translate.