recuperation item en fonction de la langue
This commit is contained in:
parent
85056034b0
commit
d26b7680b7
3 changed files with 11 additions and 5 deletions
|
@ -40,4 +40,10 @@ translations:
|
||||||
en: "comments"
|
en: "comments"
|
||||||
onlyin:
|
onlyin:
|
||||||
fr: "Seulement en"
|
fr: "Seulement en"
|
||||||
fr: "Only in"
|
en: "Only in"
|
||||||
|
whatsthis:
|
||||||
|
fr: "?"
|
||||||
|
en: "?"
|
||||||
|
loading:
|
||||||
|
fr: "Chargement en cours..."
|
||||||
|
en: "loading..."
|
||||||
|
|
|
@ -17,8 +17,7 @@ end
|
||||||
|
|
||||||
conf=LocalConf.new
|
conf=LocalConf.new
|
||||||
|
|
||||||
language=@item_rep.path
|
language=@item_rep.path.sub(/\/Scratch\//,'').sub(/\/.*$/,'')
|
||||||
language.sub!(/\/Scratch\//,'').sub!(/\/.*$/,'')
|
|
||||||
conf.language=language
|
conf.language=language
|
||||||
|
|
||||||
# the current item is an article
|
# the current item is an article
|
||||||
|
|
|
@ -23,6 +23,7 @@ def tradOfKeywordIn(keyword, language)
|
||||||
end
|
end
|
||||||
|
|
||||||
def item_of_language(language)
|
def item_of_language(language)
|
||||||
puts %{lib/multi::item_of_language not implemented yet}
|
searched_path=@item_rep.path.sub(@conf.language,language)
|
||||||
return @item
|
puts %{source path = #{@item_rep.path}, searched_path = #{searched_path}}
|
||||||
|
@items.find { |i| i.reps[0].path == searched_path }
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue