refactor: Rename constants.string into tr.

This commit is contained in:
Terry Geng
2020-07-11 10:26:42 +08:00
parent 4e541a7622
commit e84607b8e8
7 changed files with 226 additions and 220 deletions

View File

@ -147,18 +147,18 @@ class RadioItem(BaseItem):
)
def format_song_string(self, user):
return constants.strings("radio_item",
url=self.url,
title=get_radio_title(self.url), # the title of current song
name=self.title, # the title of radio station
user=user
)
return constants.tr("radio_item",
url=self.url,
title=get_radio_title(self.url), # the title of current song
name=self.title, # the title of radio station
user=user
)
def format_current_playing(self, user):
return constants.strings("now_playing", item=self.format_song_string(user))
return constants.tr("now_playing", item=self.format_song_string(user))
def format_title(self):
return self.title if self.title else self.url
def display_type(self):
return constants.strings("radio")
return constants.tr("radio")