recuperation item en fonction de la langue

This commit is contained in:
Yann Esposito (Yogsototh) 2010-01-19 16:41:53 +01:00
parent 85056034b0
commit d26b7680b7
3 changed files with 11 additions and 5 deletions

View file

@ -40,4 +40,10 @@ translations:
en: "comments"
onlyin:
fr: "Seulement en"
fr: "Only in"
en: "Only in"
whatsthis:
fr: "?"
en: "?"
loading:
fr: "Chargement en cours..."
en: "loading..."

View file

@ -17,8 +17,7 @@ end
conf=LocalConf.new
language=@item_rep.path
language.sub!(/\/Scratch\//,'').sub!(/\/.*$/,'')
language=@item_rep.path.sub(/\/Scratch\//,'').sub(/\/.*$/,'')
conf.language=language
# the current item is an article

View file

@ -23,6 +23,7 @@ def tradOfKeywordIn(keyword, language)
end
def item_of_language(language)
puts %{lib/multi::item_of_language not implemented yet}
return @item
searched_path=@item_rep.path.sub(@conf.language,language)
puts %{source path = #{@item_rep.path}, searched_path = #{searched_path}}
@items.find { |i| i.reps[0].path == searched_path }
end