Skip to content

Commit

Permalink
mvp-tema-i18n (#9): HapiPaginamCommune.archivum_extensionem
Browse files Browse the repository at this point in the history
  • Loading branch information
fititnt committed Jun 19, 2021
1 parent 1047d8a commit 5799f6b
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 7 deletions.
1 change: 0 additions & 1 deletion _data/referens.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ schemam:
- por-Latn
- eng-Latn
paginam_linguam_experimentum:
# - arb-Arab # Se nem mesmo slugs estiverem traduzidos, gera URLs repetidas
- spa-Latn
- arb-Arab
- hin-Deva
Expand Down
3 changes: 2 additions & 1 deletion _plugins/hapi/hic_sunt_dracones.rb
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,8 @@ def translationem_memoriam_rememorandum_non_perfectionem(rem)

# _[lat-Latn] Translationem memoriam rememorandum, fallendum [lat-Latn]_
def translationem_memoriam_rememorandum_fallendum(rem)
puts "\n\n\t[🔎🐛 #{self.class.name}:#{__LINE__}] fallendum [#{rem}]" if rem.est_sos?
# puts "\n\n\t[🔎🐛 #{self.class.name}:#{__LINE__}] fallendum [#{rem}]" if rem.est_sos?
puts "\n\n\t[🔎🐛 #{self.class.name}:#{__LINE__}] fallendum [#{rem.inspect}]"
end
end
end
Expand Down
1 change: 1 addition & 0 deletions _plugins/hapi/paginam/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class ApiPaginam < Hapi::HapiPaginamCommune
# Attributes for Liquid templates
ATTRIBUTES_FOR_LIQUID = %w[
alternativum
archivum_extensionem
experimentum_est
gid
uid
Expand Down
10 changes: 10 additions & 0 deletions _plugins/hapi/paginam/commune.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class HapiPaginamCommune < Jekyll::Page # rubocop:disable Metrics/ClassLength
# Attributes for Liquid templates
ATTRIBUTES_FOR_LIQUID = %w[
alternativum
archivum_extensionem
content
descriptionem
experimentum_est
Expand Down Expand Up @@ -122,6 +123,15 @@ def alternativum
resultatum
end

# Trivia
# - 'archivum'
# - https://en.wiktionary.org/wiki/archivum
# - 'extēnsionem'
# - https://en.wiktionary.org/wiki/extensio#Latin
def archivum_extensionem
'.html'
end

# Trivia
# - 'digitum'
# - https://en.wiktionary.org/wiki/digitus#Latin
Expand Down
1 change: 1 addition & 0 deletions _plugins/hapi/paginam/schemam.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ class SchemamPaginam < Hapi::HapiPaginamCommune
# Attributes for Liquid templates
ATTRIBUTES_FOR_LIQUID = %w[
alternativum
archivum_extensionem
content
descriptionem
experimentum_est
Expand Down
1 change: 1 addition & 0 deletions _plugins/hapi/paginam/tm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class TranslationemMemoriamPaginam < Hapi::HapiPaginamCommune
# Attributes for Liquid templates
ATTRIBUTES_FOR_LIQUID = %w[
alternativum
archivum_extensionem
content
descriptionem
experimentum_est
Expand Down
18 changes: 13 additions & 5 deletions _plugins/jekyll_hapi_translationem.rb
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ def explanandum_resultatum # rubocop:disable Metrics/MethodLength,)
)
end

def investigationem_contextum(contextum) # rubocop:disable Metrics/MethodLength,Metrics/AbcSize,Metrics/PerceivedComplexity
def investigationem_contextum(contextum) # rubocop:disable Metrics/MethodLength,Metrics/AbcSize
# @objectivum_archivum_extensionem = File.extname(contextum['page']['url']) unless contextum['page']['url'].nil?
@contextum_archivum_extensionem = File.extname(contextum['page']['url']) || contextum['ego_ext']
@contextum_archivum_extensionem = contextum['page']['archivum_extensionem']
@contextum_sos = contextum['page']['ego'] unless contextum['page']['ego'].nil?
@referens = contextum['site']['data']['referens']
@referens_praeiudico = contextum['site']['data']['referens']['praeiudico']
Expand Down Expand Up @@ -440,12 +440,16 @@ def farmatum_praefectum(contextum, trns_codicem, trns_resultatum)
# Trivia:
# - 'fōrmātum', https://en.wiktionary.org/wiki/formatus#Latin
# - 'alternandum', https://en.wiktionary.org/wiki/alternandus#Latin
def farmatum_alternandum_neo(rem) # rubocop:disable Metrics/MethodLength,Metrics/AbcSize
def farmatum_alternandum_neo(rem) # rubocop:disable Metrics/MethodLength,Metrics/AbcSize,Metrics/CyclomaticComplexity
puts "\n\n\t[🔎🆘🔍 #{self.class.name}] #{__LINE__} [#{rem.inspect}]" if rem.est_sos?
# return rem.objectivum_textum + 'so texto' if rem.est_textum_solum_est?
return rem.objectivum_textum if rem.est_textum_solum_est? && rem.objectivum_textum
return rem.fontem_textum if rem.est_textum_solum_est?

puts 'oi' if rem.est_sos?
# puts 'oi est_html' if rem.est_sos? && rem.est_html?
# puts 'oi est_html' if rem.est_html?

# attrs = {
# 'lang' => rem.fontem_linguam.bcp47,
# 'data-l10n-fontem-linguam' => rem.fontem_linguam.linguam,
Expand All @@ -465,6 +469,11 @@ def farmatum_alternandum_neo(rem) # rubocop:disable Metrics/MethodLength,Metrics
return "<span #{attrs_str}>#{rem.fontem_textum}</span>"
end

puts 'oi2' if rem.est_sos?
puts rem.objectivum_textum if rem.est_sos?
puts rem.inspect if rem.est_sos?
puts 'oi2' if rem.est_sos?

# puts "\n\n\t[🔎🆘🔍 #{self.class.name}] #{__LINE__} [#{rem.inspect}]" if rem.est_sos?
# _[eng] If not HTML, then likely to be JSON, XML or CSV. If this is
# an error, use 🔎🆘🔍 on the tag
Expand Down Expand Up @@ -783,8 +792,7 @@ def render(context) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength,Metri
# puts "\n\n\t[🔎🐛 #{self.class.name}:#{__LINE__}] [#{@tag_aux.inspect}]"
# puts "\n\n\t[🔎🐛 #{self.class.name}:#{__LINE__}] [#{rem.inspect}]"
# puts "\n\n\t[🔎🐛 #{self.class.name}:#{__LINE__}] [#{rem.inspect}]"
puts 'sos_est' if rem.sos_est
puts 'est_sos?' if rem.est_sos?

if rem.paratum_est
# return Translationem.farmatum_praefectum(
# context, rem.fontem_textum, rem.fontem_textum
Expand Down
2 changes: 2 additions & 0 deletions documentum/arb-Arab/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,6 @@ translationem_debug: false # true
# [eng]_
---

teste->{% _🗣️ 🔎🆘🔍 licentiam_nomen 🔎🆘🔍 🗣️_ %}<-teste

{%- include index-corporeum.html -%}

0 comments on commit 5799f6b

Please sign in to comment.