Changeset 28424 in osm


Ignore:
Timestamp:
2012-06-01T22:30:50+02:00 (12 years ago)
Author:
stoecker
Message:

add launchpad pot file upload approving

Location:
applications/editors/josm/i18n
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/i18n/README.TXT

    r27020 r28424  
    441) Getting new translation catalog file:
    55Call "ant pot"
    6 Upload the new file to Launchpad
     6Upload the new file to Launchpad (see below)
    77
    882) Updating translations to current state (from daily updated Bazar repository):
     
    1010
    11113) Update translations from Launchpad download:
    12 Call "./launchpad.pl <url>", wehre <url> is the supplied URL from launchpad.
     12Call "./launchpad.pl <url>", where <url> is the supplied URL from launchpad.
    1313This call always builds core and plugins, but safely can be aborted after core is completed.
    1414
  • applications/editors/josm/i18n/launchpad.pl

    r28409 r28424  
    170170    chdir("po");
    171171    $mech->submit_form(with_fields => {"file" => "josm.pot"});
     172    $mech->get("https://translations.launchpad.net/josm/trunk/+imports?field.filter_status=NEEDS_REVIEW&field.filter_extension=pot");
     173    my @links;
     174    foreach my $line (split("\n", $mech->content()))
     175    {
     176      push (@links, $1) if $line =~ /href="(\/\+imports\/\d+)"/;
     177    }
     178    if(!@links)
     179    {
     180      warn "Upload not found in import list, upload possibly failed.";
     181    }
     182    elsif(@links > 1)
     183    {
     184      warn "More than one upload found in import list, cannot approve.";
     185    }
     186    else
     187    {
     188      $mech->get("https://translations.launchpad.net$links[0]");
     189      $mech->submit_form(form_name => "launchpadform", button => "field.actions.approve");
     190      if(!($mech->content() =~ /There are no entries that match this filtering/))
     191      {
     192        warn "Approving possibly failed.";
     193      }
     194    }
     195
    172196    chdir("..");
    173197}
Note: See TracChangeset for help on using the changeset viewer.