As we know, Minium Developer supports JSON files and it shows the code in green colour but, yesterday it turned into white colour code like plain text and doesn't recognize anything, even if I import an existing proyect or create a new proyect. Why is this happening?
The screenshot
The JSON code
{
"loginJSON":
{
"url": "https://minium.vilt.io/docs/developer/minium-developer/",
"idioma": "Castellano",
"usuario": "user",
"pin1": "2236",
"pin2": "6322"
},
"altaHuchaJSON":
{
"motivo": "Viaje",
"nombre": "Crear guardiola test",
"objetivo": "300",
"fecha": "15/8/2019",
"aportacion": "100"
}
}
Json files are always presented as white text, since Minium Developer does not support the syntax highlight for the json files, but Minium Developer is able to detect and read json files.
Related
I have tried putting this in my settings.json file-
{
"emmet.triggerExpansionOnTab": true,
"emmet.includeLanguages": {"django-html": "html"},
"files.associations": {
"**/templates/*.html": "django-html",
"**/templates/*": "django-txt",
"**/requirements{/**,*}.{txt,in}": "pip-requirements",
"*.html": "html"
}}
But it makes no changes vs code still only reads Django and not html. I am unable to get closing tags or autocomplete for html. I have tried every solution available on the internet but none works. Although every time I uninstall the django extension from vs code it starts reading html code again. I have tried all methods available on the internet but none work, sometimes it only read html and sometimes only django. Please help
According to Django Extension (I suppose you are using this one), below Usage section the appropriate settings to set are:
"files.associations": {
"**/*.html": "html",
"**/templates/**/*.html": "django-html",
"**/templates/**/*": "django-txt",
"**/requirements{/**,*}.{txt,in}": "pip-requirements"
},
Note: Copy and replace the code above with yours (which I think is the cause to your problem).
If you wanna take advantage of emmet, you should add the line below to your settings.json:
"emmet.includeLanguages": {"django-html": "html"},
Note: I don't think setting "emmet.triggerExpansionOnTab" to true is doing anything in your case.
Besides, django-html documents doesn't seem to get formatted properly with prettier formatter, so I suggest using the settings bellow to format django-html using beautify:
"beautify.language": {
"html": [
"django-html"
]
},
Redoc is a great tool, but I'm struggling to understand how it works. Currently I've been tasked with copying some docs from api-docs.io to be self served using redoc.
However, my issue is that the schemas aren't appearing in the side bar as they do on the api-docs site. I'm not sure how I can get models to show on the side as well... And I'm fairly new to api documentation. You can also check out how the models are displayed here. And see another example below.
I've taken a look to see if this is a feature of redoc and came across this merged PR which (based on the discussion in the PR's issue) states that we should add an html element, SchemaDefinition. I am using the basic html file (suggested in the readme of the redoc repo), but we want to use a json schema (which is referenced with spec-url) to render the docs on redoc so I'm struggling to understand how I can manipulate the side bar using just the html element.
Maybe it's just my understanding of how redoc works that is lacking. If you feel that's the case, a quick explanation would be wonderful.
You have to modify the json with additional information.
Sample json (without sidebar model section): https://petstore3.swagger.io/api/v3/openapi.json
Add to "tags" array
{
"name": "pet_model",
"description": <SchemaDefinition schemaRef="#/components/schemas/Pet" />,
"x-displayName": "Pet"
},
{
"name": "user_model",
"description": <SchemaDefinition schemaRef="#/components/schemas/User" />,
"x-displayName": "User"
}
Then to group the sidebar add the x-tagGroups extension
...
"tags": [...],
"x-tagGroups": [{
"name": "Api",
"tags": ["pet", "store", "user"]
},
{
"name": "Models",
"tags": ["pet_model", "user_model"]
}],
"paths": ...
I have a .json file and i've created snippets under json.json for user snippets. Is there anyway I can get access to them inside the values' string of the JSON object. e.g:
{
"someKey": "some value [INSERT SNIPPET HERE]"
}
i've tried:
"editor.quickSuggestions": {
"other": true,
"comments": true,
"strings": true
}
with no joy, any ideas?
Super old question by now but for anybody that still needs the answer:
In addition to editing editor.quickSuggestions like op did, you have to go to Tab Completion in Setting and turn that on (I put it on "onlySnippets").
This feature is off by default, even if you can use Snippets with tab without it being on for some reason.
Define a keyboard shortcut for editor.action.showSnippets (Command: Insert Snippet).
Inside the string hit the keyboard shortcut and type the snippet prefix.
I'm currently having a regular HTML website in multiple languages. I've tried something with PHP, but that didn't turned out very well. What I need is a Multi language site without:
- Subdomains (like en.domain.tld)
- Paths (like domain.tld/en)
What I do need:
- Languages that are stored in sessions/cookies
- Languages which can be used around the whole site (with one place to store the language files, if that's necessary)
- Preferably without visible indications in the URL (like ?lang=en).
A bit like how Google does it, because I also have multiple TLDs, so the user shouldn't be required to change their language by visiting another domain like .de, if they set their language to English from the .com site.
What is the best solution for this? I'm also very new to making websites, so that's why I'm asking.
What i prefer to do is
Create a localization directory at the top level of your app
index.html
app.js
localization/
Inside localization directory create two files
web-en.json
{
"title":"Hello world",
"desc":"languages are fun"
}
web-es.json
{
"title":"Hola Mundo",
"desc":"idiomas son divertidos"
}
Install this library "jquery-localize": "https://github.com/coderifous/jquery-localize.git"
bower install jquery-localize
Include the library
Add the attributes to your HTML tags
Hello World will go here
Translated desc will replace this text
Call the library onReady
$(function(){
$("[data-localize]").localize("localization/web");
};
Yes it's possible to translate a website and save its selected language across the whole website without changing the URL.
You can use Cloud Translation, it's a free and open-source project from Angry Monkey Cloud: https://github.com/angrymonkeycloud/CloudTranslation.
You should add a reference to jQuery first, then to the CloudTranslation JavaScript file:
<script crossorigin="anonymous" src="https://cdn.amcapi.com/translation/cloudtranslation-1.0.0.min.js"></script>
And add the configuration within the HTML head as follows:
<script type="application/json" id="CloudTranslationConfig">
{
"Settings": {
"DefaultLanguage": "en",
"UrlLanguageLocation": "", // Keep empty
"TranslatorProvider": "Azure", // Could be empty if you want to provide the translations manually
"TranslatorProviderKey": "{Your Microsoft Azure Translator Key}",
"UrlLanguageLocation": "Subdirectory"
},
"Languages": [
{
"Code": "en",
"DisplayName": "English"
},
{
"Code": "de",
"DisplayName": "Deutsch"
}
]
}
</script>
and add your own custom select (dropdown) having the class "CloudTranslationSelect" to display the list of predefined languages.
More information found on https://www.angrymonkeycloud.com/translation
The integration guidlines for the Spotify Apps API mentions DefaultTabs and how it should be expressed in the manifest.json file to achieve tabbing in your Spotify app. Unfortunately I have problem getting this to work and the app that it refers to (Tabs, with the URI spotify:app:tabs) for example doesn't exist in my preview build of the Spotify application.
The application can specify what tabs it wants in the manifest file, in the DefaultTabs attribute. The attribute must be a list of records. Each record must contain the attributes arguments and title. The title can, and should, be localized by making it into a record with attributes for each language (currently en, fr and es).
I have tried the following:
Adding this snippet to my manifest.json file:
"DefaultTabs": [{
arguments: [],
title: {"en": "På TV4"}
}
]
Quitting the Spotify application and reloading it.
Load my app by entering it's address spotify:app:name in the address field.
Here I expected to see the tabs loaded, but it wasn't. Any help with the correct syntax would be appreciated.
I had a few issues at first too, but the following snippet works for me:
"DefaultTabs": [
{
"arguments": "test",
"title": { "en": "test" }
},
{
"arguments": "test2",
"title": { "en": "test2" }
}
]
I think you are probably missing the arguments.
Also check out the Kitchensink demo app and sourcecode in GitHub: https://github.com/ptrwtts/kitchensink