-
Posts
10,896 -
Joined
-
Last visited
-
Days Won
348
Everything posted by adrian
-
@Robin S - sorry, turns out it wasn't a repeater issue, but rather because I didn't have the Hanna Code Text Formatter applied to the textarea field. The thing is that I don't actually want it applied because I handle the replacements myself with my own template code rather than code within the Hanna rule. This doesn't prevent me from applying the text formatter to the field anyway, but what does prevent me from wanting to do that is that I use the text as the label for the repeater item and I want the hanna code to show in that label, eg, I don't want this: but rather this: Do you think you could alter things so that the text formatter doesn't need to be applied to the field?
-
@Robin S - not sure if this is a new issue (maybe a change to the PW core - I am running latest dev version), but it looks like the dropdown is not showing when the field is in a repeater. I haven't looked at this field in a while, but I am pretty sure it used to work. Let me know if you can't reproduce and I'll look into it more. Thanks.
-
Yeah, I think so for sure.
-
New field (created via GUI) without tags: Then apply: $field->useTags = 1; $field->save(); but nothing happens yet. But then reload the field settings page in the admin and now it looks correct: so it seems like the updating of the DB schema doesn't happen on save(), but rather when the field is loaded. My guess would be that this behavior was broken when Ryan added the new custom image fields a while back.
-
I didn't try creating a new field, but I altered an existing one by visiting the field settings and using this in the Tracy console: $field->useTags = 1; $field->save(); and it worked as expected. Also, just in case you didn't notice (I am sure you did), the options are 0, 1, 8, 9
-
@ryan - I am noticing that if I click the Update button, it updates the version number (and other info from Github), but it doesn't change the "Updated" date which I think it pretty important. Thanks for taking a look. Also, any chance of changing the dates from yyyy/mm/dd to yyyy-mm-dd so it's a little cleaner / more standard. I think as devs we are more used to the dashes when looking at this order of y, m, and d. I think it makes it clearer which is the month vs the day.
-
@ryan - I think it would be a little cleaner if the edit button didn't show for modules that you don't have permission to edit. At the moment it's weird to suggest that I can edit someone else's module, but when I click the button, I get: " Your account does not have permission to edit ....."
-
1) Works for me also and I haven't made any changes for over a month. 2) I agree that an explicit classname section would be a nice improvement. 3) Also no problem here - it redirects as expected.
-
I don't have time to dig into this further today, but wanted to let everyone know that with PHP8 I am having some fatal errors. It was kinda OK until I tried to turn on JIT (based on https://stitcher.io/blog/php-8-jit-setup), but after that, the admin wouldn't load - sometimes Tracy would manage to tell me that it was a CSRF exception. I tried disabling JIT, but that wasn't enough. In the end, I had to disable opcache - in my case, that required commenting out the line: zend_extension=/usr/local/opt/php/lib/php/20200930/opcache.so in my /usr/local/etc/php/8.0/conf.d/ext-opcache.ini file. Note that this on my Mac with LAMP stack installed via homebrew. The browser console was showing the following error: ERR_INCOMPLETE_CHUNKED_ENCODING which others have reported a connection to opcache: https://stackoverflow.com/questions/29894154/chrome-neterr-incomplete-chunked-encoding-error Need to read and learn more, but would also appreciate it if someone else has any insights.
-
Actually, even this works: $page->getField('first_name')->columnWidth
-
Much cleaner - I always forget about that option for some reason!
-
@Motion Expert - this value is not stored by this module, but rather by PW in general. You can get the width of a field in the content of a particular fieldgroup (basically the same as a template) like this: In my example, I have the width of the first_name field set to 50% for the user template/fieldgroup.
-
module Fluency - The complete translation enhancement suite for ProcessWire
adrian replied to FireWire's topic in Modules/Plugins
Thanks! As and FYI and a question to any Spanish / French / Italian (and any other languages that have gender specific nouns / verbs), I submitted a support ticket to DeepL yesterday asking about a way to specify the gender of names because of this scenario. my friend John -> mi amigo John my friend Jenny -> mi amiga Jenny my friend Jody -> what do we do here - DeepL doesn't know if Jody is male or female because it is used as both. I proposed to them that it might be nice to be able to send something like this to be translated: my friend <male>Jody</male> Of course this is a very simple example of gender translation issues (there are verb conjugation / contraction issues like ayudarle / ayudarla), but you get the idea. Actually, I barely know what I am talking about with this stuff but the process of investigating is helping my very limited spanish. DeepL is actually very impressive with this stuff. Anyone out there with any more experience have any thoughts?- 220 replies
-
- 1
-
- translation
- language
-
(and 1 more)
Tagged with:
-
module Fluency - The complete translation enhancement suite for ProcessWire
adrian replied to FireWire's topic in Modules/Plugins
Thanks @FireWire - all that sounds great!- 220 replies
-
- translation
- language
-
(and 1 more)
Tagged with:
-
module Fluency - The complete translation enhancement suite for ProcessWire
adrian replied to FireWire's topic in Modules/Plugins
Just wondering if the translate method in the Fluency class should be public so we can call the translate method more easily. I made that change locally, and now I can do: As you can see, now I can load the module and call translate directly, without the need to get and apply the API key. I guess this has more overhead but not really sure if it is significant. What do you think?- 220 replies
-
- 1
-
- translation
- language
-
(and 1 more)
Tagged with:
-
module Fluency - The complete translation enhancement suite for ProcessWire
adrian replied to FireWire's topic in Modules/Plugins
Thanks @FireWire - just testing the dev version and a couple of things: 1) Parse Error: syntax error, unexpected '$output' (T_VARIABLE) (line 230 of site/modules/Fluency/classes/DeepL.class.php) I added the missing semi-colon to fix that. 2) Because the new $configs parameter is actually the 5th parameter for the translate method, you need to specify something for the 4th one ($ignoredStrings). So what worked for me, was this: which is great because now there is no period at the end, and also they didn't capitalize the first letter. I do wonder if there is much advantage for API use to use your class over a direct call, but it seems like there might be some added value, like the automatic stripping of any <fluency-ignore> tags etc. Anyway, thanks for the update - that's great and I'll be sure to look into the API to see what other options might be worth playing with.- 220 replies
-
- translation
- language
-
(and 1 more)
Tagged with:
-
module Fluency - The complete translation enhancement suite for ProcessWire
adrian replied to FireWire's topic in Modules/Plugins
@FireWire - is this the recommended way to use directly via the API? A bit off topic, but do you know why the returned text ends with a period? It also happens with some other phrases and is consistent with the results returned on the site here: https://www.deepl.com/en/translator but it's weird to me that it tries to fix grammar in some cases but not others - maybe it assumes that this is a complete sentence, but things like "the dog" are not and so in that case it doesn't add the period. Do you know if there is a setting for this?- 220 replies
-
- translation
- language
-
(and 1 more)
Tagged with:
-
module Fluency - The complete translation enhancement suite for ProcessWire
adrian replied to FireWire's topic in Modules/Plugins
I just took a look at your code and saw that you're already using preg_match_all so I could actually just add: \[\[([\w]+)\]\] as a non translated string and that takes care of excluding Hanna codes, so I think we are all good actually, although it might be nice to note this in the settings.- 220 replies
-
- 1
-
- translation
- language
-
(and 1 more)
Tagged with:
-
module Fluency - The complete translation enhancement suite for ProcessWire
adrian replied to FireWire's topic in Modules/Plugins
Or perhaps you could add a little more flexibility by allowing the "Global Non-translated strings" option to support regexes so we could exclude things like hanna codes and others as needed?- 220 replies
-
- 1
-
- translation
- language
-
(and 1 more)
Tagged with:
-
module Fluency - The complete translation enhancement suite for ProcessWire
adrian replied to FireWire's topic in Modules/Plugins
Great - thanks! I have another request for you - can you make it possible to not translate hanna codes, eg anything inside this: [[don't_translate]] - you'll want to make sure to find out what the open and close tags are for Hanna in each PW install, but that's easy. Does that make sense? Thanks again - this is really awesome!!!- 220 replies
-
- 1
-
- translation
- language
-
(and 1 more)
Tagged with:
-
module Fluency - The complete translation enhancement suite for ProcessWire
adrian replied to FireWire's topic in Modules/Plugins
Looking at the repo (https://gitlab.com/SkyLundy/fluency-processwire), it seems pretty clear why it's happening - you have all the files stored inside a "Fluency" folder. When PW installs from the zip file, it extracts everything into a higher level Fluency directory, which is why there end up being two. Take a look at any other PW module and you'll see that the main files are at the top level.- 220 replies
-
- 1
-
- translation
- language
-
(and 1 more)
Tagged with:
-
module Fluency - The complete translation enhancement suite for ProcessWire
adrian replied to FireWire's topic in Modules/Plugins
@FireWire - just installed and on going to the Translation page, I get these errors: PHP Warning: file_get_contents(/site/modules/Fluency/fluency_templates/el_h1.tpl.html): failed to open stream: No such file or directory in .../Fluency/classes/FluencyTools.class.php:31 PHP Warning: file_get_contents(/site/modules/Fluency/fluency_templates/el_p.tpl.html): failed to open stream: No such file or directory in .../Fluency/classes/FluencyTools.class.php:31 I installed via the URL to the zip file and the problem is that it resulted in two "Fluency" directories such that the path is actually: /var/www/dev.grief.coach/site/modules/Fluency/Fluency/fluency_templates/el_p.tpl.html Once I moved those files and did a modules > refresh it started working as expected.- 220 replies
-
- 1
-
- translation
- language
-
(and 1 more)
Tagged with:
-
Exception SQLSTATE[HY000] [2002], SSL encryped database connections
adrian replied to Lutz's topic in General Support
@Jonathan Lahijani - are they on the same VPC Network? I am a big DO user, but haven't ever used their database cluster so I don't have any ideas about the speed but just wondered if maybe that would help. Actually, maybe it's not possible for a database cluster to be on the same VPC network?