diff --git a/Projects/Superalgos/Schemas/Docs-Topics/docs-languages-004-docs-in-italian.json b/Projects/Superalgos/Schemas/Docs-Topics/docs-languages-004-docs-in-italian.json new file mode 100644 index 000000000..b6d77bcf3 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/docs-languages-004-docs-in-italian.json @@ -0,0 +1,27 @@ +{ + "topic": "Docs Languages", + "pageNumber": "4", + "type": "Docs In Italian", + "definition": { + "text": "The Docs articles are fully written in English. The system allow users to search / browse articles in other languages as well, as long as other users contribute translations." + }, + "paragraphs": [ + { + "style": "Text", + "text": "Superalgos and any other integrated project are written in English, since English is considered the default language. Node types, variable names, etc., all is originally in English language. " + }, + { + "style": "Text", + "text": "The Docs content can be translated by anyone willing to contribute some time doing so. That helps users to read the contents of the Docs in their native language. " + }, + { + "style": "Success", + "text": " Users can switch between languages using the links provided at the footer of every page at the Docs. ", + "updated": 1609085068937 + }, + { + "style": "Note", + "text": "You can only add or delete pages to the Docs if you are navigating it in English, because English is the default language, and from there pages are later translated. " + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/UI/Spaces/Docs-Space/Footer.js b/Projects/Superalgos/UI/Spaces/Docs-Space/Footer.js index 812c3d5f5..5019ac25a 100644 --- a/Projects/Superalgos/UI/Spaces/Docs-Space/Footer.js +++ b/Projects/Superalgos/UI/Spaces/Docs-Space/Footer.js @@ -58,6 +58,7 @@ function newSuperalgosDocsFooter() { HTML = HTML + '
' + text + ''
break
}
case 'Javascript': {
- let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
+ let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
html = html + '' + text + ''
break
}
case 'List': {
- let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
+ let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.superalgos.utilities.docs.addKeyboard(text)
text = UI.projects.superalgos.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.superalgos.utilities.docs.addCodeToWhiteList(text)
@@ -1286,7 +1325,7 @@ function newSuperalgosTutorialSpace() {
break
}
case 'Callout': {
- let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
+ let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.superalgos.utilities.docs.addKeyboard(text)
text = UI.projects.superalgos.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.superalgos.utilities.docs.addCodeToWhiteList(text)
@@ -1295,13 +1334,13 @@ function newSuperalgosTutorialSpace() {
break
}
case 'Link': {
- let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
+ let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
let splittedText = text.split('->')
html = html + '' + splittedText[0] + ''
break
}
case 'Note': {
- let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
+ let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.superalgos.utilities.docs.addKeyboard(text)
text = UI.projects.superalgos.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.superalgos.utilities.docs.addCodeToWhiteList(text)
@@ -1310,7 +1349,7 @@ function newSuperalgosTutorialSpace() {
break
}
case 'Success': {
- let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
+ let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.superalgos.utilities.docs.addKeyboard(text)
text = UI.projects.superalgos.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.superalgos.utilities.docs.addCodeToWhiteList(text)
@@ -1319,7 +1358,7 @@ function newSuperalgosTutorialSpace() {
break
}
case 'Important': {
- let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
+ let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.superalgos.utilities.docs.addKeyboard(text)
text = UI.projects.superalgos.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.superalgos.utilities.docs.addCodeToWhiteList(text)
@@ -1328,7 +1367,7 @@ function newSuperalgosTutorialSpace() {
break
}
case 'Warning': {
- let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
+ let text = UI.projects.superalgos.utilities.docs.getTextBasedOnLanguage(paragraph)
text = UI.projects.superalgos.utilities.docs.addKeyboard(text)
text = UI.projects.superalgos.utilities.docs.addCodeToCamelCase(text)
text = UI.projects.superalgos.utilities.docs.addCodeToWhiteList(text)
diff --git a/Projects/Superalgos/UI/Utilities/Docs.js b/Projects/Superalgos/UI/Utilities/Docs.js
index eeac1b80b..7d434ded7 100644
--- a/Projects/Superalgos/UI/Utilities/Docs.js
+++ b/Projects/Superalgos/UI/Utilities/Docs.js
@@ -601,13 +601,18 @@ function newSuperalgosUtilitiesDocs() {
const MAX_NUMBER_OF_WORDS = 10
text = text.trim()
let cleanText = text.replace(/'/g, ' AMPERSAND ') // scaping ampersands, separating them from other words
- .replaceAll('<', ' < ')
- .replaceAll('>', ' > ')
- .replaceAll(':', ' : ')
- .replaceAll(',', ' , ')
- .replaceAll('.', ' . ')
- .replaceAll('!', ' ! ')
- let words = cleanText.split(' ')
+ .replaceAll(':', ' :')
+ .replaceAll(',', ' ,')
+ .replaceAll('.', ' .')
+ .replaceAll('!', ' !')
+ let allWords = cleanText.split(' ')
+ let words = []
+ for (let i = 0; i < allWords.length; i++) {
+ let word = allWords[i]
+ if (word !== "") {
+ words.push(word)
+ }
+ }
let taggedText = ''
for (let i = 0; i < words.length; i++) {
@@ -617,7 +622,7 @@ function newSuperalgosUtilitiesDocs() {
for (let j = 0; j < MAX_NUMBER_OF_WORDS; j++) {
let word = words[i + j]
- if (word === "" ) { word = " "}
+ if (word === "") { word = " " }
if (word !== undefined) {
if (phrase === '') {
phrase = word
@@ -666,12 +671,10 @@ function newSuperalgosUtilitiesDocs() {
}
}
taggedText = taggedText.replaceAll(' AMPERSAND ', '\'')
- .replaceAll(' < ', '<')
- .replaceAll(' > ', '>')
- .replaceAll(' : ', ':')
- .replaceAll(' . ', '.')
- .replaceAll(' , ', ',')
- .replaceAll(' ! ', '!')
+ .replaceAll(' :', ':')
+ .replaceAll(' .', '.')
+ .replaceAll(' ,', ',')
+ .replaceAll(' !', '!')
.replaceAll(' ', ' ')
return taggedText
}
diff --git a/Projects/Superalgos/UI/Utilities/Languages.js b/Projects/Superalgos/UI/Utilities/Languages.js
index c8c03590a..848a263f3 100644
--- a/Projects/Superalgos/UI/Utilities/Languages.js
+++ b/Projects/Superalgos/UI/Utilities/Languages.js
@@ -20,6 +20,10 @@ function newSuperalgosUtilitiesLanguages() {
languageLabel = 'Russian'
break
}
+ case 'IT': {
+ languageLabel = 'Italian'
+ break
+ }
}
return languageLabel
}