223
225
DistroSeriesBinaryPackage: at
226
== DistroSeriess have components and sections ==
228
DistroSeriess have components and sections
229
------------------------------------------
228
231
A distroseries has some number of components and/or sections which
229
232
are valid for that distroseries. These selections are used by (among
402
The hide_all_translations flag, if set, hides a distroseries'
403
translations in the user interface. The check for visibility happens in
404
checkTranslationsViewable.
406
>>> untranslatable_series = factory.makeDistroRelease()
407
>>> untranslatable_series.hide_all_translations = False
409
When translations are visible, checkTranslationsViewable() completes
412
>>> from canonical.launchpad.webapp.interfaces import (
413
... TranslationUnavailable)
414
>>> def get_visibility_notice(series):
415
... """Print the notice about series' translations being hidden."""
417
... series.checkTranslationsViewable()
418
... except TranslationUnavailable, e:
422
>>> print get_visibility_notice(untranslatable_series)
425
But when translations are hidden, it raises TranslationUnavailable.
427
>>> untranslatable_series.hide_all_translations = True
428
>>> print get_visibility_notice(untranslatable_series)
429
Translations for this release series...
431
Exactly what message is displayed depends on the series' status.
433
>>> untranslatable_series.status = SeriesStatus.EXPERIMENTAL
434
>>> print get_visibility_notice(untranslatable_series)
435
Translations for this release series are not available yet.
437
>>> untranslatable_series.status = SeriesStatus.DEVELOPMENT
438
>>> print get_visibility_notice(untranslatable_series)
439
Translations for this release series are not available yet.
441
>>> untranslatable_series.status = SeriesStatus.FROZEN
442
>>> print get_visibility_notice(untranslatable_series)
443
Translations for this release series are not currently available.
444
Please come back soon.
446
>>> untranslatable_series.status = SeriesStatus.CURRENT
447
>>> print get_visibility_notice(untranslatable_series)
448
Translations for this release series are not currently available.
449
Please come back soon.
451
>>> untranslatable_series.status = SeriesStatus.SUPPORTED
452
>>> print get_visibility_notice(untranslatable_series)
453
Translations for this release series are not currently available.
454
Please come back soon.
456
>>> untranslatable_series.status = SeriesStatus.OBSOLETE
457
>>> print get_visibility_notice(untranslatable_series)
458
This release series is obsolete. Its translations are no longer
461
>>> untranslatable_series.status = SeriesStatus.FUTURE
462
>>> print get_visibility_notice(untranslatable_series)
463
Translations for this release series are not available yet.
466
== Translatable Packages and Packaging ==
403
Translatable Packages and Packaging
404
-----------------------------------
468
406
You can easily find out what packages are translatable in a
469
407
distribution release: