-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…importado; criado _data/referens.yml (para versão mais avançada de defaults do Jekyll
- Loading branch information
Showing
10 changed files
with
147 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# - "referēns" | ||
# - https://en.wiktionary.org/wiki/referens#Latin | ||
# - https://en.wiktionary.org/wiki/reference#English | ||
# - "scopum" | ||
# - https://en.wiktionary.org/wiki/scopus#Latin | ||
# - https://en.wiktionary.org/wiki/scope#English | ||
# - "front-matter-defaults" | ||
# - https://jekyllrb.com/docs/configuration/front-matter-defaults/ | ||
|
||
linguam: | ||
eng: | ||
locale: en | ||
|
||
## Noticia: | ||
## [por] Em geral, vamos usar Português (genérico) e evitar usar pt_BR | ||
## ou pt_PT. Isso faz sentido em outras línguas onde a diferença é | ||
## muito mais significativa, porém português escrito tem pouca | ||
## variações | ||
por: | ||
locale: pt | ||
por-BR: | ||
locale: pt_BR | ||
por-PT: | ||
locale: pt_PT | ||
|
||
|
||
### Temp | ||
# - https://en.wikipedia.org/wiki/IETF_language_tag |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{% comment %} | ||
# @see https://github.com/fititnt/ais-ethics-tags/blob/master/assets/js/ais-ethics-tags.js | ||
# @see https://github.com/EticaAI/HXL-Data-Science-file-formats/blob/main/hxlm-js/bootstrapper/hdpb-l10n.mjs | ||
{% endcomment %} | ||
<script type="module"> | ||
|
||
/** | ||
* HDPbL10n | ||
* | ||
* Trivia: | ||
* - i18n with lowercase "i" | ||
* - L10n with UPPERCASE "L" | ||
* Fontem: | ||
* - https://github.com/fititnt/ais-ethics-tags/blob/master/assets/js/ais-ethics-tags.js | ||
* - https://github.com/EticaAI/HXL-Data-Science-file-formats/blob/main/hxlm-js/bootstrapper/hdpb-l10n.mjs | ||
*/ | ||
class HDPbL10n { | ||
|
||
/** | ||
* Who I am | ||
* | ||
* Trivia: | ||
* - 'Quis sum?' is 'who I am' in Latin | ||
* - 'mea linguam' is 'my (natural) language' in Latin | ||
* - 'mea linguam fontem' is 'my source (natural) language' in Latin | ||
* - 'mea linguam et alli' needs revision. (its an array) | ||
* - Code: | ||
* - Based on the English version ais-ethics-tags.js (https://tags.etica.ai) | ||
* @returns {Object} | ||
*/ | ||
static quis_sum() { | ||
// TODO: navigator.languages does not work when running with NodeJS. | ||
// we should at least make it not break hard | ||
// (Emerson Rocha, 2021-04-06 00:05 UTC) | ||
|
||
let resultatum = {}; | ||
resultatum.meaLinguam = navigator.language || navigator.userLanguage; | ||
resultatum.meaLinguamEtAliiFontem = navigator.languages || [resultatum.meaLinguam]; | ||
resultatum.meaLinguamEtAlii = []; | ||
resultatum.meaLinguamEtAliiFontem.forEach(function (lang) { | ||
let wdLang = lang.split('-'); | ||
if (resultatum.meaLinguamEtAlii.indexOf(wdLang[0]) === -1) { | ||
resultatum.meaLinguamEtAlii.push(wdLang[0]); | ||
} | ||
}) | ||
return resultatum | ||
} | ||
} | ||
|
||
// debug | ||
console.log(HDPbL10n.quis_sum()) | ||
|
||
export { HDPbL10n } | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters