Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#8177 closed defect (fixed)

Four themestrings in schedule-ui.xml are untranslatable (due to type=zero?)

Reported by: Kenni Lund <kenni@…> Owned by: stuartm
Priority: minor Milestone: 0.24
Component: MythTV - User Interface Library Version: head
Severity: medium Keywords:
Cc: Ticket locked: no


The following four themestrings in schedule-ui.xml are translatable in linguist, but the translations are not used:

"Normal recording priority" (spinbox name="priority" from="basewidespinbox")
"Start recording on time" (spinbox name="startoffset" from="basewidespinbox")
"End recording on time" (spinbox name="endoffset" from="basewidespinbox")
"No episode limit" (spinbox name="maxepisodes" from="basewidespinbox")

As far as I can tell it is all the strings which contains the <template type="zero"> tag, as strings in the same file without this tag or with type="negative" or type="positive" translates without any issues. Also Arclight doesn't use the zero-tag for the maxepisodes_label, and this tag is translated in Arclight (as the only one of the following themes).

I haven't been able to create a patch for this, as I haven't been able to find information about the consequence of removing or changing the tag.

[kenni@ION trunk]$ grep -r -e ' type="zero"' mythtv myththemes/|grep ".xml:"
mythtv/themes/default-wide/schedule-ui.xml:            <template type="zero">Normal recording priority</template>
mythtv/themes/default-wide/schedule-ui.xml:            <template type="zero">Start recording on time</template>
mythtv/themes/default-wide/schedule-ui.xml:            <template type="zero">End recording on time</template>
mythtv/themes/default-wide/schedule-ui.xml:            <template type="zero">No episode limit</template>
mythtv/themes/Terra/schedule-ui.xml:            <template type="zero">Normal recording priority</template>
mythtv/themes/Terra/schedule-ui.xml:            <template type="zero">Start recording on time</template>
mythtv/themes/Terra/schedule-ui.xml:            <template type="zero">End recording on time</template>
mythtv/themes/Terra/schedule-ui.xml:            <template type="zero">No episode limit</template>
mythtv/themes/MythCenter-wide/schedule-ui.xml:            <template type="zero">Normal recording priority</template>
mythtv/themes/MythCenter-wide/schedule-ui.xml:            <template type="zero">Start recording on time</template>
mythtv/themes/MythCenter-wide/schedule-ui.xml:            <template type="zero">End recording on time</template>
mythtv/themes/MythCenter-wide/schedule-ui.xml:            <template type="zero">No episode limit</template>
mythtv/themes/MythCenter/schedule-ui.xml:            <template type="zero">Normal recording priority</template>
mythtv/themes/MythCenter/schedule-ui.xml:            <template type="zero">Start recording on time</template>
mythtv/themes/MythCenter/schedule-ui.xml:            <template type="zero">End recording on time</template>
mythtv/themes/MythCenter/schedule-ui.xml:            <template type="zero">No episode limit</template>
mythtv/themes/default/schedule-ui.xml:            <template type="zero">Normal recording priority</template>
mythtv/themes/default/schedule-ui.xml:            <template type="zero">Start recording on time</template>
mythtv/themes/default/schedule-ui.xml:            <template type="zero">End recording on time</template>
mythtv/themes/default/schedule-ui.xml:            <template type="zero">No episode limit</template>
myththemes/Graphite/schedule-ui.xml:            <template type="zero">Normal recording priority</template>
myththemes/Graphite/schedule-ui.xml:            <template type="zero">Start recording on time</template>
myththemes/Graphite/schedule-ui.xml:            <template type="zero">End recording on time</template>
myththemes/Graphite/schedule-ui.xml:            <template type="zero">No episode limit</template>
myththemes/Mythbuntu/schedule-ui.xml:            <template type="zero">Normal recording priority</template>
myththemes/Mythbuntu/schedule-ui.xml:            <template type="zero">Start recording on time</template>
myththemes/Mythbuntu/schedule-ui.xml:            <template type="zero">End recording on time</template>
myththemes/Mythbuntu/schedule-ui.xml:            <template type="zero">No episode limit</template>
myththemes/Arclight/schedule-ui.xml:            <template type="zero">Normal</template>
myththemes/Arclight/schedule-ui.xml:            <template type="zero">Start on time</template>
myththemes/Arclight/schedule-ui.xml:            <template type="zero">End on time</template>

Change History (8)

comment:1 Changed 11 years ago by Kenni Lund <kenni@…>

This issue does not affect all languages. The Danish, the Norwegian and the Swedish translations are affected by this issue, but the French translation is not affected by this issue.

comment:2 Changed 11 years ago by robertm

Component: ThemesMythTV - User Interface Library
Owner: changed from Isaac Richards to stuartm
Status: newassigned

comment:3 Changed 11 years ago by stuartm

Resolution: fixed
Status: assignedclosed

(In [25621]) Probable fix for strings not being translated with spinboxes in certain languages. Fixes #8177. Please re-open the ticket if this doesn't work.

comment:4 Changed 11 years ago by Kenni Lund [kenni a kelu dot dk] <kenni@…>

Thanks for the try, but unfortunately it didn't help. I've just tested it with r25628 and the problem still exists.

Steps to replicate problem (in Terra theme):

  1. Switch language to Danish and go to main menu.
  2. Go to "Administrer optagelser" -> "Planlæg optagelser" -> "Programguide" -> Click on some program -> select "Optag kun denne udsendelse" -> "Planlægningsindstillinger".
  3. The three strings "Normal recording priority", "Start recording on time" and "End recording on time" are all in English instead of in Danish.

The three strings are correctly translated in mythfrontend_da.qm in trunk.

comment:5 Changed 11 years ago by Kenni Lund [kenni a kelu dot dk] <kenni@…>

Resolution: fixed
Status: closednew

comment:6 Changed 11 years ago by robertm

Status: newassigned

comment:7 Changed 11 years ago by stuartm

Milestone: unknown0.24
Resolution: fixed
Status: assignedclosed

(In [25635]) Fix translations of non-numerous strings used in a spinbox. We want to be able to handle both '0 recordings' and 'No recordings' alike, tr() when called with n won't translate the latter which I consider a bug in QT. The fix is just to check for %n in the string first and only use the plural form if it exists.

comment:8 Changed 11 years ago by Kenni Lund [kenni a kelu dot dk] <kenni@…>

Thank you stuartm, i can confirm that it works with the fix in r25635 :)

Note: See TracTickets for help on using tickets.