Browse Source

Cleanup Chordpro lang management

pull/124/head
Oliverpool 9 years ago
parent
commit
cda6ea3c94
  1. 12
      patacrep/songs/chordpro/__init__.py

12
patacrep/songs/chordpro/__init__.py

@ -36,17 +36,7 @@ class ChordproSong(Song):
song = parse_song(song.read(), self.fullpath) song = parse_song(song.read(), self.fullpath)
self.authors = song.authors self.authors = song.authors
self.titles = song.titles self.titles = song.titles
self.lang = song.get_data_argument('lang', self.config['lang'])
# Lang inverted priority (last one is preferred):
# config['lang']
# song.language
# song.lang
self.lang = self.config['lang']
language = song.get_data_argument('language')
if language:
# self.lang is automatically updated
self.language = language
self.lang = song.get_data_argument('lang', self.lang)
self.data = song.meta self.data = song.meta
self.cached = { self.cached = {

Loading…
Cancel
Save