Skip to content

Commit

Permalink
HXL-CPLP/forum#58, hapi-t9n-alpha (#13), mvp-l10n-schemas (#7): quod_…
Browse files Browse the repository at this point in the history
…sos_est?, quod_venandum_insectum_est?, VENANDUM_INSECTUM_EMOJI = ['🔎🐛🔍'], SOS_EMOJI = ['🔎🆘🔍']
  • Loading branch information
fititnt committed May 30, 2021
1 parent 78f08a3 commit d14b262
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 24 deletions.
3 changes: 3 additions & 0 deletions _data/tm/commune.tm.hxl.csv
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ PDF_archivum_salvandum_nomen,,1,,,,,,PDF,archivum_salvandum,nomen,,Salvandum PDF
L10N_linguam_Q436240_nomen,Q436240,1,L10N,L10N,linguam,Q436240,,,,nomen,,,∅,Língua antiga,∅,Ancient language,∅,,∅
L10N_linguam_Q33215_nomen,Q33215,1,L10N,L10N,linguam,Q33215,,,,nomen,,,∅,Língua artificial,∅,Constructed language,∅,,∅
L10N_linguam_Q38058796_nomen,Q38058796,1,L10N,L10N,linguam,Q38058796,,,,nomen,,,∅,Língua extinta,∅,Extinct language,∅,,∅
venandum_insectum_nomen,Q845566,1,computatrum,,,,,venandum_insectum,,nomen,,Vēnandum īnsectum,∅,Depuração,debugging|debug,Debugging,debug,Depuracion de codigo,∅
venandum_insectum_emoji_nomen,Q845566,1,computatrum,,,,,venandum_insectum,emoji,nomen,,🔎🐛💾Vēnandum īnsectum 💾🐛🔍,∅,🔎🐛💾 Depuração 💾🐛🔍,∅,🔎🐛💾 Debugging 💾🐛🔍,∅,🔎🐛💾 Depuracion de codigo 💾🐛🔍,∅
emoji_nomen,Q1049294,1,,,,,,emoji,,nomen,,Emoji,∅,Emoji,∅,Emoji,∅,Emoji,∅
72 changes: 62 additions & 10 deletions _plugins/jekyll_hapi_translationem.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,22 @@ module TranslationemNeo
# see https://github.com/Shopify/liquid/wiki/Liquid-for-Programmers
# @see https://github.com/ticky/ruby-emoji-regex
# @see https://github.com/janlelis/unicode-emoji
# @see https://github.com/harttle/liquidjs
class AuxiliumTagProcessum
attr_accessor :tag_nomen, :initiale_argumentum, :fontem_linguam,
attr_accessor :tag_fontem, :tag_nomen, :initiale_argumentum, :fontem_linguam,
:objectivum_linguam, :ignorandum_hashtag,
:ignorandum_attributum, :textum, :referens
:ignorandum_attributum, :textum, :error,
:initiale_processum, :venandum_insectum_est, :sos_est, :referens

FONTEM_LINGUAM_EMOJI = ['👁️'].freeze
OBJECTIVUM_LINGUAM_EMOJI = ['📝'].freeze
VENANDUM_INSECTUM_EMOJI = ['🔎🐛🔍'].freeze
SOS_EMOJI = ['🔎🆘🔍'].freeze

def initialize(initiale_tag_nomen, initiale_argumentum, _initiale_processum)
def initialize(initiale_tag_nomen, initiale_argumentum, initiale_processum)
@initiale_argumentum = initiale_argumentum.strip.split

@tag_fontem = "{% #{initiale_tag_nomen}#{initiale_argumentum}%}"
# argumentum_parts = initiale_argumentum.strip.split
if initiale_tag_nomen.include?('🗣️')
@tag_nomen = initiale_tag_nomen
Expand All @@ -50,32 +56,60 @@ def initialize(initiale_tag_nomen, initiale_argumentum, _initiale_processum)
# puts argumentum_parts
end

@error = []
@initiale_processum = initiale_processum

@venandum_insectum_est = quod_venandum_insectum_est?
@sos_est = quod_sos_est?
@fontem_linguam = quod_fontem_linguam_de_initiale_argumentum_et_textum
@objectivum_linguam = quod_objectivum_linguam_de_initiale_argumentum_et_textum
@textum = quod_textum_de_initiale_argumentum_et_textum

puts ' AuxiliumTagProcessum: initialize'
puts @tag_nomen
puts @tag_fontem
puts @fontem_linguam
puts @objectivum_linguam

ad_absurdum_l10n_tag
end

# @see https://en.wikipedia.org/wiki/List_of_Latin_phrases_(full)
def ad_absurdum_l10n_tag
# TODO: pegar linha do @initiale_processum
puts "Ad absurdum L10N tag: @tag_nomen [#{tag_nomen}], @initiale_argumentum " \
"[#{@initiale_argumentum}], @initiale_argumentum [#{@initiale_argumentum}], " \
"error [#{@error}], @initiale_processum.line_numbers [#{@initiale_processum['line_numbers']}]"
end

def quod_fontem_linguam_de_initiale_argumentum_et_textum
return nil unless @initiale_argumentum.length > 1

print 'oi oi oi'
print @fontem_linguam_emoji.to_s
print @fontem_linguam_emoji.inspect
quod_optionem_est(FONTEM_LINGUAM_EMOJI)
# print 'oi oi oi'
# print @fontem_linguam_emoji.to_s
# print @fontem_linguam_emoji.inspect
resultatum = quod_optionem_est?(FONTEM_LINGUAM_EMOJI)

# puts 'ooooooooooooooi'
# puts resultatum
unless resultatum.nil? || resultatum['valere'].nil?
@initiale_argumentum.delete_if { |item| item.include?(resultatum['tags']) }

@initiale_argumentum
end
end

def quod_objectivum_linguam_de_initiale_argumentum_et_textum
return nil unless @initiale_argumentum.length > 1

quod_optionem_est(OBJECTIVUM_LINGUAM_EMOJI)
resultatum = quod_optionem_est?(OBJECTIVUM_LINGUAM_EMOJI)
unless resultatum.nil? || resultatum['valere'].nil?
@initiale_argumentum.delete_if { |item| item.include?(resultatum['tags']) }

@initiale_argumentum
end
end

def quod_optionem_est(emojis)
def quod_optionem_est?(emojis)
return nil unless @initiale_argumentum.length > 1

valere = nil
Expand All @@ -97,8 +131,26 @@ def quod_optionem_est(emojis)
}
end

def quod_venandum_insectum_est?
VENANDUM_INSECTUM_EMOJI.each do |item|
return true if @initiale_argumentum.include?(item)
# if @initiale_argumentum.include?(item)
end
false
end

def quod_sos_est?
SOS_EMOJI.each do |item|
return true if @initiale_argumentum.include?(item)
# if @initiale_argumentum.include?(item)
end
false
end

def quod_textum_de_initiale_argumentum_et_textum
return @initiale_argumentum[0] if @initiale_argumentum.length == 1

@initiale_argumentum.join(' ')
end

def hashtag_exemplum
Expand Down
26 changes: 12 additions & 14 deletions documentum/mappam-situm.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ <h2>Pāginam</h2>
</pre>
<h2>L10N</h2>
<!-- TEST CODE -->
<h3>Alternative 1</h3>
<h3>🗣️📝💾 Localization [neolatīnum; de ISO639-3:eng] 💾📝🗣️</h3>
<p>
<dl>
<dt>Padrão (usa informações do contexto)</dt>
Expand All @@ -94,19 +94,20 @@ <h3>Alternative 1</h3>

</dl>
</p>
<h3>Debug enforced</h3>
<h3>🔎🐛💾Vēnandum īnsectum 💾🐛🔍</h3>
<p>
<dl>

<dt>Debug habilitado</dt>
<dt>{% raw %}<code>{% _🗣️🔎🐛 L10N_ego_summarius 🐛🔍🗣️_ %}</code>{% endraw %}</dt>
<dd><output>{% _🗣️🔎🐛 L10N_ego_summarius 🐛🔍🗣️_ %}</output></dd>
<dt>Debug habilitado</dt>
<dt>{% raw %}<code>{% _🗣️🔍🐛 👁️spa-Latn👁️ 📝por-Latn📝 Idioma español (Alfabeto latino) 📝por-Latn📝 👁️spa-Latn👁️ 🐛🔍🗣️_ %}</code>{% endraw %}</dt>
<dd><output>{% _🗣️🔍🐛 👁️spa-Latn👁️ 📝por-Latn📝 Idioma español (Alfabeto latino) 📝por-Latn📝 👁️spa-Latn👁️ 🐛🔍🗣️_ %}</output></dd>
<dt>Exemplum I</dt>
<dt>{% raw %}<code>{% _🗣️ 🔎🐛🔍 L10N_ego_summarius 🔎🐛🔍 🗣️_ %}</code>{% endraw %}</dt>
<dd><output>{% _🗣️ 🔎🐛🔍 L10N_ego_summarius 🔎🐛🔍 🗣️_ %}</output></dd>
<dt>Exemplum II</dt>
<dt>{% raw %}<code>{% _🗣️ 🔎🐛🔍 👁️spa-Latn👁️ 📝por-Latn📝 Idioma español (Alfabeto latino) 📝por-Latn📝 👁️spa-Latn👁️ 🔎🐛🔍 🗣️_ %}</code>{% endraw %}</dt>
<dd><output>{% _🗣️ 🔎🐛🔍 👁️spa-Latn👁️ 📝por-Latn📝 Idioma español (Alfabeto latino) 📝por-Latn📝 👁️spa-Latn👁️ 🔎🐛🔍 🗣️_ %}</output></dd>

<dt>Strings padrões de software (não deve ser usado para testes externos)</dt>
<dt>{% raw %}<code>{% _ I18N_إختبار_טעסט_测试_테스트_испытание_I18N _ %}</code>{% endraw %}</dt>
<dt>Exemplum III</dt>
<dt>_[por]Strings padrões de software (não deve ser usado para testes externos)[por]_</dt>
<!-- <dt>{% raw %}<code>{% _ I18N_إختبار_טעסט_测试_테스트_испытание_I18N _ %}</code>{% endraw %}</dt> -->
<dd><output>{% _ I18N_إختبار_טעסט_测试_테스트_испытание_I18N _ %}</output></dd>
</dl>
</p>
Expand Down Expand Up @@ -177,10 +178,7 @@ <h2>Emoji (uso interno do CPLP para decidir os comandos)</h2>
{% _🗣️🔎🐛 L10N_ego_summarius 🐛🔍🗣️_ %}

(...)
{% _🗣️🔍🐛 👁️spa-Latn👁️ 📝por-Latn📝 Idioma español (Alfabeto latino) 📝por-Latn📝 👁️spa-Latn👁️ 🐛🔍🗣️_ %}
{% _🗣️🔎🐛 👁️spa-Latn👁️ 📝por-Latn📝 Idioma español (Alfabeto latino) 📝por-Latn📝 👁️spa-Latn👁️ 🐛🔍🗣️_ %}
{% _🗣️🔎🐛 👁️spa-Latn👁️ 📝por-Latn📝 Idioma español (Alfabeto latino) 📝por-Latn📝 👁️spa-Latn👁️ 🐛🔎🗣️_ %}

{% _🗣️ 🔎🐛🔍 👁️spa-Latn👁️ 📝por-Latn📝 Idioma español (Alfabeto latino) 📝por-Latn📝 👁️spa-Latn👁️ 🔎🐛🔍 🗣️_ %}

(...)
// Inverso de debug (tente tolerar errors o máximo possível)
Expand Down

0 comments on commit d14b262

Please sign in to comment.