How to instances in .env in laravel? - laravel

I wish to integrate CHATkit in my app, and there are some codes that I need to add in my env file, I just wonder what is the proper format to add that code? (like with quotation or without)
here is the code
CHATKIT_INSTANCE_LOCATOR="INSTANCE_LOCATOR_HERE"
CHATKIT_SECRET_KEY="SECRET_KEY_HERE"
CHATKIT_GENERAL_ROOM_ID="GENERAL_ROOM_ID"
MIX_APP_URL="${APP_URL}"
MIX_CHATKIT_INSTANCE_LOCATOR="${CHATKIT_INSTANCE_LOCATOR}"
here is how I added them with their proper values.
CHATKIT_INSTANCE_LOCATOR=v1:us1:6db08bfb-a81f-4755-99ea-a3eed57df62d
CHATKIT_SECRET_KEY=669c38c0-59de-4346-8abe-20ee4d4ed4a0:ici2p2eaY4qaxpDxd2EFXTSj537JLpheQjenRBSTJVM=
CHATKIT_GENERAL_ROOM_ID=368ec6e3-b7d2-4b32-8e07-700700b51c94
MIX_APP_URL="${APP_URL}"
MIX_CHATKIT_INSTANCE_LOCATOR="${CHATKIT_INSTANCE_LOCATOR}"

"These are all strings. It's entirely fine to quote them"
Answered by #ceejayoz

Related

Get comments that contain specific words Gerrit

I want to ask about Gerrit, I'm looking into the review comments on the Nova project, I want to know if I can get all the comments that contain specific words, like 'TEXT'.
I tried comments:'TEXT' but it doesn't work, it even gets a code change that contains no comments at all
Are you using single or double quotation marks? It worked pretty well for me in Gerrit 3.4.1, using double quotation marks, as the following example:
comment:"shame on me"

How to use $ (dollar sign) ^(exponent sign) in yaml?

I saw a YAML file that includes some signs like $, ^. For $, I think it tries to get value from a JSON file. But for ^, I'm not sure about that.
I tried to search for the YAML syntax but cannot find the usage of those signs.
Could anyone point out where that usage from? Thanks a lot!
examples:
json: $.A.Documents[*]
input: ^.B.ID
YAML doesn't assign any special meaning to those characters. As far as YAML is concerned, they are simply part of the content.
Of course, the software loading that YAML can do anything with the loaded data – including inspecting the loaded scalars for $ and ^ and implementing some action on them.
While someone might be able to correctly guess which software expects a YAML file like the one you show, it would be vastly easier for you to check the context in which you found that YAML file. This should lead you to the information you seek – i.e., for which software that YAML file has been written. That software's documentation will then describe how those characters are processed.

Generate lang files dynamically

I have a situation that I had to sync my array with language files, so every time I had to generate & translate it.
I was looking for a package like laravel-langman it has an option to sync. But now that I am looking, it doesn't allow me to create a key with the value using artisan commend directly without asking for input.
Any Help will be appreciated.
You should check out this page maybe, it mentions multiple packages that solve your problem. We currently use a combination of 2 packages. I think the first one has what you want.
We use 2 packages to solve this issue, one is for the basic translations that don't get added dynamically, for this we used: waavi/translation
Now you still need it working for dynamically created or removed translations which you need if you want your models to contain multi language descriptions or something similar. For this we used: dimsav/laravel-translatable
With both of those you are all set, but you can also see if you like another package over the ones i listed.

Go rendering URL RowQuery string in a template - different behaviours

I 'm new to go and I got my mind stuck with something pretty trivial, so I ask for your help, maybe anyone knows why this behaviour happens:
I want to output the query params string of an url object in a template, but apparently because of the "?" char placed in front of the variable, the (whole) output is url encoded. Does question mark has a special meaning in go templates?
instead of param1=value1&value2=param2, output is param1%3dvalue1%26value2%3dparam2
Example in go playground
The Go documentation of the html/template package explains the behaviour (https://golang.org/pkg/html/template/):
The security model used by this package assumes that template authors are trusted, while Execute's data parameter is not. More details are provided below.
The thing about this is that you should really think twice about why you don't want Go to apply this security behaviour to your template.
Then, if you're really sure you don't want to escape the string use template.URL intead of a string: https://play.golang.org/p/kfv2tH6WDG

Magento translation fails

I have trouble translating the phrase "%s was added to your shopping cart." in magento. This is a message that is called in a php-controller (cartController.php).
I use csv-files for the translation and checked them multiple times for errors (missing quotes, wrong quotes, ...), but the translation still won't work. Translating inline seems also impossible as no option is shown to translate success-messages.
I also checked the store language (which is set to Dutch), locale configuration and via code what language he finds, this all turns out fine, everything is okay.
Does anyone know what next steps I should take to investigate this problem or even better: does anyone know a solution for this problem? I found many threads like this one, but unanswered or without an answer for me.
One more thing: Yes, I cleared my cache and translations ;-).
Tx
Try to put translate.csv into your theme folder:
(root)/app/design/frontend/(theme)/default/locale/nl_NL/translate.csv
And put your translation there.
Check the encoding of your file Mage_Checkout.csv
Probably you have ANSI or UTF-8, but it should be "UTF-8 without BOM", otherwise Magento has troubles in using the translation file.

Resources