Commits on Sep 9, 2021

  1. spec: Add support for source locales

    This allows specifying the locale of the source translatable strings
    in a component. The vast majority of the time, this is `en_US`, but
    that’s not guaranteed. Add a `source_locale` attribute to allow changing
    this default.
    
    The attribute has been added to the `<translation/>` element so that it
    can be used by the metadata generator to synthesize a `<lang/>` element
    for the source locale.
    
    It’s not been added to the `<languages>` element, as it’s assumed that
    element is auto-generated and hence can include the source locale
    explicitly as a `<lang/>` element.
    
    Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
    
    Helps: ximion#345
    pwithnall committed Sep 9, 2021

Commits on Sep 10, 2021

  1. as-translation: Add a new source-locale property

    This reflects the new `source_locale` attribute added to the
    specification.
    
    Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
    
    Helps: ximion#345
    pwithnall committed Sep 10, 2021
  2. compose: Support source locales for translations

    Support parsing the new `<translation source_locale=""/>` attribute, and
    turn it into a fake `<lang/>` entry at 100% for the source locale.
    
    Add tests.
    
    Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
    
    Fixes: ximion#345
    pwithnall committed Sep 10, 2021