mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 16:02:00 +02:00
Mark popovers text as translatable
This commit is contained in:
@@ -222,10 +222,8 @@ class ClapperWidget extends Gtk.Grid
|
|||||||
switch(info.constructor) {
|
switch(info.constructor) {
|
||||||
case GstClapper.ClapperVideoInfo:
|
case GstClapper.ClapperVideoInfo:
|
||||||
type = 'video';
|
type = 'video';
|
||||||
codec = info.get_codec() || 'Undetermined';
|
codec = info.get_codec() || _('Undetermined');
|
||||||
text = codec + ', ' +
|
text = `${codec}, ${info.get_width()}x${info.get_height()}`;
|
||||||
+ info.get_width() + 'x'
|
|
||||||
+ info.get_height();
|
|
||||||
let fps = info.get_framerate();
|
let fps = info.get_framerate();
|
||||||
fps = Number((fps[0] / fps[1]).toFixed(2));
|
fps = Number((fps[0] / fps[1]).toFixed(2));
|
||||||
if(fps)
|
if(fps)
|
||||||
@@ -233,24 +231,22 @@ class ClapperWidget extends Gtk.Grid
|
|||||||
break;
|
break;
|
||||||
case GstClapper.ClapperAudioInfo:
|
case GstClapper.ClapperAudioInfo:
|
||||||
type = 'audio';
|
type = 'audio';
|
||||||
codec = info.get_codec() || 'Undetermined';
|
codec = info.get_codec() || _('Undetermined');
|
||||||
if(codec.includes('(')) {
|
if(codec.includes('(')) {
|
||||||
codec = codec.substring(
|
codec = codec.substring(
|
||||||
codec.indexOf('(') + 1,
|
codec.indexOf('(') + 1, codec.indexOf(')')
|
||||||
codec.indexOf(')')
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
text = info.get_language() || 'Undetermined';
|
text = info.get_language() || _('Undetermined');
|
||||||
text += ', ' + codec + ', '
|
text += `, ${codec}, ${info.get_channels()} ` + _('Channels');
|
||||||
+ info.get_channels() + ' Channels';
|
|
||||||
break;
|
break;
|
||||||
case GstClapper.ClapperSubtitleInfo:
|
case GstClapper.ClapperSubtitleInfo:
|
||||||
type = 'subtitle';
|
type = 'subtitle';
|
||||||
const subsLang = info.get_language();
|
const subsLang = info.get_language();
|
||||||
text = (subsLang) ? subsLang.split(',')[0] : 'Undetermined';
|
text = (subsLang) ? subsLang.split(',')[0] : _('Undetermined');
|
||||||
const subsTitle = Misc.getSubsTitle(info.get_title());
|
const subsTitle = Misc.getSubsTitle(info.get_title());
|
||||||
if(subsTitle)
|
if(subsTitle)
|
||||||
text += ', ' + subsTitle;
|
text += `, ${subsTitle}`;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
debug(`unrecognized media info type: ${info.constructor}`);
|
debug(`unrecognized media info type: ${info.constructor}`);
|
||||||
@@ -260,7 +256,7 @@ class ClapperWidget extends Gtk.Grid
|
|||||||
if(!tracksArr.length)
|
if(!tracksArr.length)
|
||||||
{
|
{
|
||||||
tracksArr[0] = {
|
tracksArr[0] = {
|
||||||
label: 'Disabled',
|
label: _('Disabled'),
|
||||||
type: type,
|
type: type,
|
||||||
activeId: -1
|
activeId: -1
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user