[mb-commits] branch, beta, updated. Merge branch 'master' into beta Merge branch 'beta'
MusicBrainz Git Server <[email protected]> Tue, 15 Jan 2013 03:15:14 +0000
| Newsgroups | gmane.comp.audio.musicbrainz.cvs |
|---|---|
| Message-ID | <E1TuwzZ-0005br-Ps@wiley> |
The branch, beta has been updated
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=545d83e98188d9caaf2c2a19a8945bfcc76a9818 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=7f34d271fed459ea4b7da7cead5e2e0ee7cc4ee8 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=fb1ad49f5cddd906e7a6be72d2428298b922d271 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=539c7e504483397910080f9345b6303d7d21f9b4 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=38d50b727bca67910b113731a6bff534be256b81 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=09e04aff7d375c0d4eb94962012ee82452449d07 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=fca7018cca215b07f7d406aad0c040cc93bb99a3 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=1e2390975c307523b4cf76154728cb28b22110a6 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=611cc1d6778fbd402b760834445e36a8c47f696e (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=70c067ace6fe689c80248ecbedc8e29e8968d690 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=f8bafe63d85b2fe47d3c039586d9751a42eb4134 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=244b6589895bd37bc51d98f1d2e7380350e5816a (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=0f609e6d76341d07570534c0cdc7eb0128737409 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=36b35231fd9902dfc11d86e4e85f29c18b38f4e1 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=0c46d04143f833c2543f09d271530f586f08161a (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=9bb8c826cd2e6207aa170708bd7d8981841a938e (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=a8c7bb9774021f9812e856fcffd1c188a0a29bc2 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=d6d75499f5c4d3130e5dcad613125646b999a07d (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=a7fb2e7ae73b79d90d3a8cc075e506ad38792b57 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=a2dcbd32fb191638cd3ec7937afbc61ed25768f7 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=8bffcba5f8f3e5f39120ee4bb7c8ff62146ef804 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=d6936c0bc05e53587fc544dcdd8758eaa7e02a22 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=00d8d7d6d3ba6256d9ac057b2b9756166f3ddf33 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=9511434f8be3d563f824999872a3ceab4a1e66c6 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=e9e3c66ee4868a8863851bbbc1c2dc4327347d88 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=911264ab6646fb940a64cb687458cd88c53d80b5 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=041121a8112c734c71bc781bbb327d65ef3f4004 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=e6a0717337c0ace9ae85390a11c24b9b913aadb4 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=c1e8ded33b3861d13fa1defb95f6b59fa56cfb43 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=fe8f2a39159d24927da1aead28d3d88b3975c903 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=b0e91e2b4d4dd5e0aa51cbfd33d563f3df163ce3 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=4d46c76030cf48968970dd8acf1c2a1a5e239f28 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=4cd55df1a13d24553d3a309df2159ca94fc3883f (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=e3e7893631c1dc5adbb82e15abe30a969c087a07 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=8cca844437da56049acb9ba74bbb1ae8b3956a6b (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=273a40193dd1931c3697ab375bb8eadad0956e8c (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=57b24733ad8c09acd787d790d578d13f6c194088 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=f15d9d7855a1c72e773d868b59af5bc6ff9afaa6 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=e622f0cb411e4b0f26cda2232785e81926a70612 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=87782c1bb74e2191d2246b690b57eb7116a78f23 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=74d5095b28a6bef688218a8bf97bd249f36f1d25 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=aa9e0b923c6bc932b350f5eba946f86a7faaed3b (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=7d8fba4a49e610d1b921091f9385122cdb2c8187 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=69336dfff4cf6c55e77d71da69f3b41f6fb6fce4 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=0b2545647fd828b8b481b33d98796d969f583c09 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=55ba161a7b8548296dfa05876bb0285e7d8eb301 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=03046806a77180092f4cada41e60e6af0ce1ded7 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=7839a0eb19e4a98175c76a88774afab197731e21 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=d504762eafb9d3f47691dd85af6c64a062fd6670 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=5e1c19c76445fb769621b9192965b81b9fbb93cd (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=1d062f5859a24a41cc21877848edd64e853729a8 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=1d94f11c2d445ade701664945cc84d2065cce2d5 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=8a120396cc4ecd6d5f605d7e98ed815e8541e90f (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=6dfe1e4c67ed0833918d012343ca7a2a926836b1 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=144994457abfd3167b07e2b17d2b010f44fb2202 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=b9d1930b51fb4b8c7079b80eaeb32d40fe103a99 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=643f5f3350dd57aed9ec8f9d1636f664c4f65e1c (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=ace37903afc424b22bdc6ec6f528b84d20e725e9 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=83d9b1aec4128b7a7300aaa6de801724ecc4f007 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=f886b369f3179236a4b58f7be85ce41dbd687f07 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=46ae32afdf4d50b1e56d156d0d01abb756aa641e (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=2239bfa441ab53566919a008fbb7acf410d6ecdc (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=7da9e13de2fab19882350610238708f9f2ffb3f6 (commit)
from http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=5a6ebf5a80910e7169bec031dace547f46b01860 (commit)
Summary of changes:
admin/replication/LoadReplicationChanges | 6 +
admin/replication/hooks/post-process.sample | 8 +
lib/MusicBrainz/Server/Controller/WS/2/Release.pm | 6 +
lib/MusicBrainz/Server/Data/CoverArtArchive.pm | 12 ++
lib/MusicBrainz/Server/Data/URL.pm | 1 +
.../Server/Entity/URL/{DHHU.pm => TheSession.pm} | 4 +-
.../Server/WebService/Serializer/JSON/2/Release.pm | 14 ++-
lib/MusicBrainz/Server/WebService/XMLSerializer.pm | 16 ++
po/fixup/20130103-contexts.pl | 28 ++++
po/fixup/20130107-MBS-5651.py | 87 ++++++++++
po/mb_server.de.po | 8 +-
po/mb_server.el.po | 6 +-
po/mb_server.es.po | 8 +-
po/mb_server.et.po | 8 +-
po/mb_server.fi.po | 8 +-
po/mb_server.fr_FR.po | 6 +-
po/mb_server.it.po | 8 +-
po/mb_server.nl.po | 8 +-
root/artist/recordings-list.tt | 2 +-
root/cdstub/edit_form.tt | 2 +-
root/cdstub/index.tt | 2 +-
root/cdtoc/attach_artist_releases.tt | 6 +-
root/cdtoc/attach_confirm.tt | 4 +-
root/cdtoc/attach_filter_artist.tt | 4 +-
root/cdtoc/attach_filter_release.tt | 6 +-
root/components/common-macros.tt | 7 +-
root/components/forms.tt | 6 +-
root/components/wikipedia_extract.tt | 2 +-
root/edit/details/add_cover_art.tt | 2 +-
root/edit/details/edit_cover_art.tt | 3 +-
root/edit/details/remove_cover_art.tt | 2 +-
root/edit/list.tt | 4 +-
root/layout/menu.tt | 12 +-
root/main/401.tt | 5 +-
root/recording/add_isrc.tt | 4 +-
root/recording/create.tt | 4 +-
root/recording/layout.tt | 2 +-
root/release/add_cover_art.tt | 4 +-
root/release/cover_art.tt | 7 +-
root/release/edit/information.tt | 11 +-
root/release/edit/layout.tt | 4 +-
root/release/edit/missing_entities.tt | 166 +++++++++++---------
root/release/edit/tracklist.tt | 4 +-
root/release/reorder_cover_art.tt | 4 +-
root/static/images/favicons/thesession-16.png | Bin 0 -> 600 bytes
root/static/scripts/edit/MB/Control/URLCleanup.js | 4 +-
root/static/scripts/tests/Control/URLCleanup.js | 25 +++
root/static/styles/layout.css | 4 +
root/user/ratings_summary.tt | 2 +-
root/work/create.tt | 4 +-
.../Server/Controller/WS/2/BrowseRelease.pm | 48 ++++++
.../Server/Controller/WS/2/JSON/BrowseReleases.pm | 56 +++++++
.../Server/Controller/WS/2/JSON/LookupRelease.pm | 70 ++++++++
.../Server/Controller/WS/2/LookupDiscID.pm | 18 ++
.../Server/Controller/WS/2/LookupNonCore.pm | 6 +
.../Server/Controller/WS/2/LookupRelationship.pm | 12 ++
.../Server/Controller/WS/2/LookupRelease.pm | 60 +++++++
.../Server/Controller/WS/2/LookupTagsRatings.pm | 6 +
t/sql/webservice.sql | 5 +
59 files changed, 674 insertions(+), 167 deletions(-)
create mode 100755 admin/replication/hooks/post-process.sample
copy lib/MusicBrainz/Server/Entity/URL/{DHHU.pm => TheSession.pm} (92%)
create mode 100644 po/fixup/20130103-contexts.pl
create mode 100644 po/fixup/20130107-MBS-5651.py
create mode 100644 root/static/images/favicons/thesession-16.png
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 545d83e98188d9caaf2c2a19a8945bfcc76a9818
Merge: 7f34d27 0f609e6
Author: Ian McEwen <[email protected]>
Date: Mon Jan 14 20:15:04 2013 -0700
Merge branch 'master' into beta
commit 7f34d271fed459ea4b7da7cead5e2e0ee7cc4ee8
Merge: fb1ad49 e9e3c66
Author: Ian McEwen <[email protected]>
Date: Mon Jan 14 20:14:16 2013 -0700
Merge remote-tracking branch 'navap/mbs-5022-missing-entities' into beta
* navap/mbs-5022-missing-entities:
MBS-5022: Use hidden input when performing default
Whitespace commit
MBS-5022: Use proper plural texts
commit fb1ad49f5cddd906e7a6be72d2428298b922d271
Merge: 539c7e5 4d46c76
Author: Ian McEwen <[email protected]>
Date: Mon Jan 14 20:13:41 2013 -0700
Merge remote-tracking branch 'freso/MBS-5699' into beta
* freso/MBS-5699:
MBS-5699: Make CD stubs use "Comment" for comments.
commit 539c7e504483397910080f9345b6303d7d21f9b4
Merge: 38d50b7 4cd55df
Author: Ian McEwen <[email protected]>
Date: Mon Jan 14 20:13:09 2013 -0700
Merge remote-tracking branch 'freso/MBS-5606' into beta
* freso/MBS-5606:
MBS-5606: Implement STYLE-160 in code (TheSession.org).
commit 38d50b727bca67910b113731a6bff534be256b81
Merge: 09e04af 00d8d7d
Author: Ian McEwen <[email protected]>
Date: Mon Jan 14 20:12:36 2013 -0700
Merge remote-tracking branch 'freso/MBS-5651' into beta
* freso/MBS-5651:
MBS-5651: Fix unescaped quotes in msg* strings.
MBS-5651: Escape quotes in msg* strings.
MBS-5651: Run the revised script.
MBS-5651: Handle the "barcode" link as well.
MBS-5651: Remove a trailing space in the string cleanup script.
MBS-5651: Updated *.po with the altered string.
MBS-5651: Add script to fix changed strings for translators' convenience.
MBS-5651: Make barcode and packaging links in release editor open in new windows.
commit 09e04aff7d375c0d4eb94962012ee82452449d07
Merge: fca7018 36b3523
Author: Ian McEwen <[email protected]>
Date: Mon Jan 14 20:11:46 2013 -0700
Merge remote-tracking branch 'navap/mbs-5749-401-link-to-profile' into beta
* navap/mbs-5749-401-link-to-profile:
MBS-5749: Add edit profile link to 401 error page
commit fca7018cca215b07f7d406aad0c040cc93bb99a3
Merge: 1e23909 0c46d04
Author: Ian McEwen <[email protected]>
Date: Mon Jan 14 20:10:29 2013 -0700
Merge branch 'mbs-5702-wikipedia-string' into beta
* mbs-5702-wikipedia-string:
MBS-5702: Tweak link to wikipedia below wikipedia extracts
commit 1e2390975c307523b4cf76154728cb28b22110a6
Merge: 611cc1d a8c7bb9
Author: Ian McEwen <[email protected]>
Date: Mon Jan 14 20:09:57 2013 -0700
Merge branch 'i18n-fixes-2012-10-07' into beta
* i18n-fixes-2012-10-07:
MBS-5415 revert: missed a spot
i18n: revert MBS-5415, as it's proven unworkable
i18n: Write fixup script for migrating contexts changed in this branch
i18n: pass 'View all ratings' through l()
i18n: switch to using two l() calls rather than an ln() to circumvent a gettext weirdness
i18n: transifex stupidly merges some things, differentiating
i18n: contextualize the rest of the edit menu 'Add X'
i18n: contextualize 'Attach CD TOC'
i18n: contextualize 'Add ISRC' and 'Add ISWC'
i18n: contextualize 'Reorder Cover Art'
i18n: change 'button' to 'button/menu', contextualize 'Add Release'
i18n: contextualize 'Add Cover Art'
i18n: contextualize 'Guess case'
commit 611cc1d6778fbd402b760834445e36a8c47f696e
Merge: 70c067a a2dcbd3
Author: Ian McEwen <[email protected]>
Date: Mon Jan 14 20:09:23 2013 -0700
Merge branch 'mbs-4536-release-webservice-caa' into beta
* mbs-4536-release-webservice-caa:
MBS-4536: Add some cover art to webservice.sql and update tests
MBS-4536: Fix other webservice tests that were broken
MBS-4536: Don't output cover-art-archive data in JSON if it's not loaded
Fix up existing JSON LookupRelease tests.
MBS-4536: fix existing XML ReleaseLookup tests to work with new cover-art-archive element
MBS-4536: Only test truthiness, not > 0
MBS-4536: don't use strings for booleans in JSON
MBS-4536: JSON Serialization for CAA data in release webservice
MBS-4536: Add (usually not present) <darkened> element to XML output
MBS-4536: switch to bool_or rather than count, for correctness
MBS-4536: add more stats to the CAA webservice stuff
MBS-4536: change to using <cover-art-archive><artwork> instead of simply <caa>
MBS-4536: display cover_art_presence value in the webservice
commit 70c067ace6fe689c80248ecbedc8e29e8968d690
Merge: f8bafe6 9bb8c82
Author: Ian McEwen <[email protected]>
Date: Mon Jan 14 20:08:13 2013 -0700
Merge branch 'mbs-5691-recording-list-link-isrcs' into beta
* mbs-5691-recording-list-link-isrcs:
MBS-5691: link ISRCs in the artist recording list view
commit f8bafe63d85b2fe47d3c039586d9751a42eb4134
Merge: 244b658 a7fb2e7
Author: Ian McEwen <[email protected]>
Date: Mon Jan 14 20:07:47 2013 -0700
Merge branch 'replication-hooks' into beta
* replication-hooks:
Change to using a directory full of hooks, rather than a single file.
Add support for hooks in LoadReplicationChanges, by way of a 'hooks' script; add a post-process hook and a sample hooks script.
commit 244b6589895bd37bc51d98f1d2e7380350e5816a
Merge: 5a6ebf5 e3e7893
Author: Ian McEwen <[email protected]>
Date: Mon Jan 14 20:06:41 2013 -0700
Merge branch 'mbs-5447-caa-bandwidth' into beta
* mbs-5447-caa-bandwidth:
MBS-5447: use 250px thumbnails now that quality is reasonable again (reverts MBS-4674)
commit 36b35231fd9902dfc11d86e4e85f29c18b38f4e1
Author: Pavan Chander <[email protected]>
Date: Sun Jan 13 21:11:37 2013 -0500
MBS-5749: Add edit profile link to 401 error page
diff --git a/root/main/401.tt b/root/main/401.tt
index 7f7b6df..bf08734 100644
--- a/root/main/401.tt
+++ b/root/main/401.tt
@@ -6,8 +6,9 @@
[% IF c.user && !c.user.email_confirmation_date %]
<p>
- [%- l('You must first verify your email address before being able to edit
- or add anything to the database.') -%]
+ [%- l('You must first {url|add and verify your email address} before being
+ able to edit or add anything to the database.',
+ { url => c.uri_for('/account/edit') }) -%]
</p>
[% END %]
commit 0c46d04143f833c2543f09d271530f586f08161a
Author: Ian McEwen <[email protected]>
Date: Tue Jan 8 13:16:21 2013 -0700
MBS-5702: Tweak link to wikipedia below wikipedia extracts
diff --git a/root/components/wikipedia_extract.tt b/root/components/wikipedia_extract.tt
index d6e032a..54e5c8d 100644
--- a/root/components/wikipedia_extract.tt
+++ b/root/components/wikipedia_extract.tt
@@ -1,5 +1,5 @@
[%- IF wikipedia_extract -%]
<h2 class="wikipedia">[% l('Wikipedia') %]</h2>
[%- wikipedia_extract.content -%]
- <a href="[% wikipedia_extract.url %]">[% l('Read more...') %]</a>
+ <a href="[% wikipedia_extract.url %]">[% l('Continue reading at Wikipedia...') %]</a>
[%- END -%]
commit 9bb8c826cd2e6207aa170708bd7d8981841a938e
Author: Ian McEwen <[email protected]>
Date: Mon Jan 7 23:43:26 2013 -0700
MBS-5691: link ISRCs in the artist recording list view
diff --git a/root/artist/recordings-list.tt b/root/artist/recordings-list.tt
index 0d12f12..8315249 100644
--- a/root/artist/recordings-list.tt
+++ b/root/artist/recordings-list.tt
@@ -43,7 +43,7 @@
<td>
[% FOR isrc=recording.isrcs %]
[% '<br />' IF loop.index > 0 %]
- [% isrc.isrc %]
+ [% link_isrc(isrc.isrc) %]
[% END %]
</td>
[% UNLESS no_ratings%]<td>[% rating_stars(recording) %]</td>[% END %]
commit a8c7bb9774021f9812e856fcffd1c188a0a29bc2
Author: Ian McEwen <[email protected]>
Date: Mon Jan 7 23:09:59 2013 -0700
MBS-5415 revert: missed a spot
diff --git a/root/edit/details/edit_cover_art.tt b/root/edit/details/edit_cover_art.tt
index f2a4de9..1cb266c 100644
--- a/root/edit/details/edit_cover_art.tt
+++ b/root/edit/details/edit_cover_art.tt
@@ -6,10 +6,7 @@
<td>[% descriptive_link(edit.display_data.release) %]</td>
</tr>
- [%- plural = max(edit.display_data.types.old.size, edit.display_data.types.new.size) -%]
- [%# Since the number isn't actually included in the string, we use multiple l() here rather than ln() %]
- [%- IF plural == 1; type_string = l('Type:'); ELSE; type_string = l('Types:'); END -%]
- [% display_diff(type_string,
+ [% display_diff(l('Types:'),
html_escape(edit.display_data.types.old),
html_escape(edit.display_data.types.new), ", ") %]
commit d6d75499f5c4d3130e5dcad613125646b999a07d
Author: Ian McEwen <[email protected]>
Date: Mon Jan 7 23:06:38 2013 -0700
i18n: revert MBS-5415, as it's proven unworkable
diff --git a/root/edit/details/add_cover_art.tt b/root/edit/details/add_cover_art.tt
index 5b49971..ffc79d1 100644
--- a/root/edit/details/add_cover_art.tt
+++ b/root/edit/details/add_cover_art.tt
@@ -15,8 +15,7 @@
[% IF edit.display_data.types.size %]
<tr>
- [%# Since the number isn't actually included in the string, we use multiple l() here rather than ln() %]
- <th>[% IF edit.display_data.types.size == 1; l('Type:'); ELSE; l('Types:'); END %]</th>
+ <th>[% l('Types:') %]</th>
<td>
[% USE Map %]
[% comma_only_list(edit.display_data.types.map('l_name')) | html %]
diff --git a/root/edit/details/remove_cover_art.tt b/root/edit/details/remove_cover_art.tt
index d568307..3421c3c 100644
--- a/root/edit/details/remove_cover_art.tt
+++ b/root/edit/details/remove_cover_art.tt
@@ -7,8 +7,7 @@
</tr>
<tr>
- [%# Since the number isn't actually included in the string, we use multiple l() here rather than ln() %]
- <th>[% IF edit.display_data.types.size == 1; l('Type:'); ELSE; l('Types:'); END %]</th>
+ <th>[% l('Types:') %]</th>
<td>
[% IF edit.display_data.types.size %]
[% USE Map %]
diff --git a/root/release/cover_art.tt b/root/release/cover_art.tt
index 1c84b19..d5afd6c 100644
--- a/root/release/cover_art.tt
+++ b/root/release/cover_art.tt
@@ -10,8 +10,7 @@
[%- display_artwork (artwork, undef, undef, 'mb-caa') -%]
</div>
<p>
- [%# Since the number isn't actually included in the string, we use multiple l() here rather than ln() %]
- [%- IF artwork.types.size == 1; l('Type:'); ELSE; l('Types:'); END -%]
+ [%- l('Types:') -%]
[% comma_only_list(artwork.types) || '-' %]
</p>
[%- IF artwork.comment -%]
commit a7fb2e7ae73b79d90d3a8cc075e506ad38792b57
Author: Ian McEwen <[email protected]>
Date: Mon Jan 7 20:57:55 2013 -0700
Change to using a directory full of hooks, rather than a single file.
diff --git a/admin/replication/LoadReplicationChanges b/admin/replication/LoadReplicationChanges
index 1e416aa..81a3f42 100755
--- a/admin/replication/LoadReplicationChanges
+++ b/admin/replication/LoadReplicationChanges
@@ -327,9 +327,9 @@ APPLY_CHANGES:
system "$FindBin::Bin/ProcessReplicationChanges", @process_opts;
exit $? if $?;
-if (-x "$FindBin::Bin/hooks") {
+if (-x "$FindBin::Bin/hooks/post-process") {
print localtime() . " : Running post-process hook\n";
- system "$FindBin::Bin/hooks post-process";
+ system "$FindBin::Bin/hooks/post-process";
exit $? if $?;
}
diff --git a/admin/replication/hooks.sample b/admin/replication/hooks.sample
deleted file mode 100755
index 3ee0df6..0000000
--- a/admin/replication/hooks.sample
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/bash
-# This is a sample hook file. In its current form it won't do much, but if
-# copied to 'hooks' it will echo 'one packet processed!' after each packet.
-# Alternatively, you could add calls to scripts you'd like to be run after
-# each packet, perhaps to update some derived information.
-
-case "$1" in
- post-process)
- echo 'one packet processed!';
- ;;
- *)
- echo "unknown hook $1";
-esac
diff --git a/admin/replication/hooks/post-process.sample b/admin/replication/hooks/post-process.sample
new file mode 100755
index 0000000..456eaa4
--- /dev/null
+++ b/admin/replication/hooks/post-process.sample
@@ -0,0 +1,8 @@
+#!/bin/bash
+# This is a sample post-process hook file.
+# Obviously for now this does nothing real, but if moved to 'post-process'
+# it will run after every packet and cheerfully announce it's applied one.
+# It might be more useful to add calls to scripts you'd like run, perhaps
+# to update derived information of some sort.
+
+echo 'one packet processed!';
commit a2dcbd32fb191638cd3ec7937afbc61ed25768f7
Author: Ian McEwen <[email protected]>
Date: Mon Jan 7 18:27:22 2013 -0700
MBS-4536: Add some cover art to webservice.sql and update tests
diff --git a/lib/MusicBrainz/Server/WebService/Serializer/JSON/2/Release.pm b/lib/MusicBrainz/Server/WebService/Serializer/JSON/2/Release.pm
index 370decc..57badcb 100644
--- a/lib/MusicBrainz/Server/WebService/Serializer/JSON/2/Release.pm
+++ b/lib/MusicBrainz/Server/WebService/Serializer/JSON/2/Release.pm
@@ -47,7 +47,8 @@ sub serialize
$body{'cover-art-archive'} = {
artwork => boolean($entity->cover_art_presence eq 'present'),
darkened => boolean($entity->cover_art_presence eq 'darkened'),
- count => $coverart->{total},
+ # force to number
+ count => $coverart->{total} * 1,
front => boolean($coverart->{front}),
back => boolean($coverart->{back})
};
diff --git a/t/lib/t/MusicBrainz/Server/Controller/WS/2/BrowseRelease.pm b/t/lib/t/MusicBrainz/Server/Controller/WS/2/BrowseRelease.pm
index 9cb27ea..1edc9a6 100644
--- a/t/lib/t/MusicBrainz/Server/Controller/WS/2/BrowseRelease.pm
+++ b/t/lib/t/MusicBrainz/Server/Controller/WS/2/BrowseRelease.pm
@@ -207,9 +207,9 @@ ws_test 'browse releases via track artist',
<barcode>4988064451180</barcode>
<asin>B0001FAD2O</asin>
<cover-art-archive>
- <artwork>false</artwork>
- <count>0</count>
- <front>false</front>
+ <artwork>true</artwork>
+ <count>1</count>
+ <front>true</front>
<back>false</back>
</cover-art-archive>
</release>
diff --git a/t/lib/t/MusicBrainz/Server/Controller/WS/2/JSON/BrowseReleases.pm b/t/lib/t/MusicBrainz/Server/Controller/WS/2/JSON/BrowseReleases.pm
index fe96e38..525aec1 100644
--- a/t/lib/t/MusicBrainz/Server/Controller/WS/2/JSON/BrowseReleases.pm
+++ b/t/lib/t/MusicBrainz/Server/Controller/WS/2/JSON/BrowseReleases.pm
@@ -262,9 +262,9 @@ test 'browse releases via track artist' => sub {
quality => "normal",
"text-representation" => { language => "eng", script => "Latn" },
"cover-art-archive" => {
- artwork => JSON::false,
- count => 0,
- front => JSON::false,
+ artwork => JSON::true,
+ count => 1,
+ front => JSON::true,
back => JSON::false,
darkened => JSON::false,
},
diff --git a/t/lib/t/MusicBrainz/Server/Controller/WS/2/JSON/LookupRelease.pm b/t/lib/t/MusicBrainz/Server/Controller/WS/2/JSON/LookupRelease.pm
index ddfb953..f8c99e6 100644
--- a/t/lib/t/MusicBrainz/Server/Controller/WS/2/JSON/LookupRelease.pm
+++ b/t/lib/t/MusicBrainz/Server/Controller/WS/2/JSON/LookupRelease.pm
@@ -171,9 +171,9 @@ test 'release lookup with artists + aliases' => sub {
packaging => JSON::null,
"text-representation" => { language => "eng", script => "Latn" },
"cover-art-archive" => {
- artwork => JSON::false,
- count => 0,
- front => JSON::false,
+ artwork => JSON::true,
+ count => 1,
+ front => JSON::true,
back => JSON::false,
darkened => JSON::false,
},
@@ -219,9 +219,9 @@ test 'release lookup with labels and recordings' => sub {
packaging => JSON::null,
"text-representation" => { language => "eng", script => "Latn" },
"cover-art-archive" => {
- artwork => JSON::false,
- count => 0,
- front => JSON::false,
+ artwork => JSON::true,
+ count => 1,
+ front => JSON::true,
back => JSON::false,
darkened => JSON::false,
},
@@ -300,9 +300,9 @@ test 'release lookup with release-groups' => sub {
packaging => JSON::null,
"text-representation" => { language => "eng", script => "Latn" },
"cover-art-archive" => {
- artwork => JSON::false,
- count => 0,
- front => JSON::false,
+ artwork => JSON::true,
+ count => 1,
+ front => JSON::true,
back => JSON::false,
darkened => JSON::false,
},
diff --git a/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupRelease.pm b/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupRelease.pm
index 9679cea..59a3df8 100644
--- a/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupRelease.pm
+++ b/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupRelease.pm
@@ -153,9 +153,9 @@ ws_test 'release lookup with artists + aliases',
<date>2004-03-17</date><country>JP</country><barcode>4988064451180</barcode>
<asin>B0001FAD2O</asin>
<cover-art-archive>
- <artwork>false</artwork>
- <count>0</count>
- <front>false</front>
+ <artwork>true</artwork>
+ <count>1</count>
+ <front>true</front>
<back>false</back>
</cover-art-archive>
</release>
@@ -219,9 +219,9 @@ ws_test 'release lookup with labels, recordings and tags',
</medium>
</medium-list>
<cover-art-archive>
- <artwork>false</artwork>
- <count>0</count>
- <front>false</front>
+ <artwork>true</artwork>
+ <count>1</count>
+ <front>true</front>
<back>false</back>
</cover-art-archive>
</release>
@@ -261,9 +261,9 @@ ws_test 'release lookup with release-groups',
<date>2004-03-17</date><country>JP</country><barcode>4988064451180</barcode>
<asin>B0001FAD2O</asin>
<cover-art-archive>
- <artwork>false</artwork>
- <count>0</count>
- <front>false</front>
+ <artwork>true</artwork>
+ <count>1</count>
+ <front>true</front>
<back>false</back>
</cover-art-archive>
</release>
diff --git a/t/sql/webservice.sql b/t/sql/webservice.sql
index f7612ef..17f2e71 100644
--- a/t/sql/webservice.sql
+++ b/t/sql/webservice.sql
@@ -502,6 +502,11 @@ UPDATE artist_meta SET rating_count = 3, rating = 60 WHERE id = 135345;
INSERT INTO artist_credit_name (join_phrase, artist, name, position, artist_credit) VALUES ('', 135345, 75219, 0, 135345);
INSERT INTO release_group (last_updated, comment, name, edits_pending, type, artist_credit, id, gid) VALUES ('2009-05-24 20:47:00.490177+00', '', 346153, 0, 2, 135345, 403214, '153f0a09-fead-3370-9b17-379ebd09446b');
INSERT INTO release (date_day, status, release_group, edits_pending, packaging, id, quality, country, last_updated, script, language, name, artist_credit, barcode, comment, date_year, date_month, gid) VALUES (17, 1, 403214, 0, NULL, 59662, -1, 107, '2009-08-17 08:23:42.424855+00', 28, 120, 346153, 135345, '4988064451180', '', 2004, 3, 'aff4a693-5970-4e2e-bd46-e2ee49c22de7');
+INSERT INTO editor (id, name, password) VALUES (95821, 'kuno', 'notreally');
+INSERT INTO edit (id, editor, type, status, data, expire_time) VALUES (1, 95821, 314, 2, '{}', now() + INTERVAL '2 weeks');
+INSERT INTO cover_art_archive.cover_art (id, release, comment, edit, ordering, date_uploaded, edits_pending) VALUES (1031598329, 59662, '', 1, 1, '2012-05-24 07:35:13.984115+00', 0);
+INSERT INTO cover_art_archive.art_type (id, name) VALUES (1, 'Front');
+INSERT INTO cover_art_archive.cover_art_type (id, type_id) VALUES (1031598329, 1);
INSERT INTO tracklist (last_updated, track_count, id) VALUES ('2011-01-18 15:21:33.71184+00', 0, 403214);
INSERT INTO track_name (name, id) VALUES ('the Love Bug', 2580451);
INSERT INTO artist_name (name, id) VALUES ('m-flo♥BoA', 877283);
commit 8bffcba5f8f3e5f39120ee4bb7c8ff62146ef804
Author: Ian McEwen <[email protected]>
Date: Mon Jan 7 16:04:47 2013 -0700
MBS-4536: Fix other webservice tests that were broken
diff --git a/t/lib/t/MusicBrainz/Server/Controller/WS/2/BrowseRelease.pm b/t/lib/t/MusicBrainz/Server/Controller/WS/2/BrowseRelease.pm
index 50766cb..9cb27ea 100644
--- a/t/lib/t/MusicBrainz/Server/Controller/WS/2/BrowseRelease.pm
+++ b/t/lib/t/MusicBrainz/Server/Controller/WS/2/BrowseRelease.pm
@@ -36,6 +36,12 @@ ws_test 'browse releases via artist (paging)',
</text-representation>
<date>1999-09-23</date><country>US</country>
<asin>B00001IVAI</asin>
+ <cover-art-archive>
+ <artwork>false</artwork>
+ <count>0</count>
+ <front>false</front>
+ <back>false</back>
+ </cover-art-archive>
</release>
</release-list>
</metadata>';
@@ -53,6 +59,12 @@ ws_test 'browse releases via label',
</text-representation>
<date>2008-11-17</date><country>GB</country><barcode>600116822123</barcode>
<asin>B001IKWNCE</asin>
+ <cover-art-archive>
+ <artwork>false</artwork>
+ <count>0</count>
+ <front>false</front>
+ <back>false</back>
+ </cover-art-archive>
<medium-list count="2">
<medium>
<position>1</position><format>CD</format><track-list count="9" />
@@ -70,6 +82,12 @@ ws_test 'browse releases via label',
</text-representation>
<date>2007-01-29</date><country>GB</country><barcode>600116817020</barcode>
<asin>B000KJTG6K</asin>
+ <cover-art-archive>
+ <artwork>false</artwork>
+ <count>0</count>
+ <front>false</front>
+ <back>false</back>
+ </cover-art-archive>
<medium-list count="1">
<medium>
<position>1</position><format>CD</format><track-list count="12" />
@@ -92,6 +110,12 @@ ws_test 'browse releases via release group',
</text-representation>
<date>2001-07-04</date><country>JP</country><barcode>4942463511227</barcode>
<asin>B00005LA6G</asin>
+ <cover-art-archive>
+ <artwork>false</artwork>
+ <count>0</count>
+ <front>false</front>
+ <back>false</back>
+ </cover-art-archive>
</release>
<release id="b3b7e934-445b-4c68-a097-730c6a6d47e6">
<title>Summer Reggae! Rainbow</title><status>Pseudo-Release</status>
@@ -101,6 +125,12 @@ ws_test 'browse releases via release group',
</text-representation>
<date>2001-07-04</date><country>JP</country><barcode>4942463511227</barcode>
<asin>B00005LA6G</asin>
+ <cover-art-archive>
+ <artwork>false</artwork>
+ <count>0</count>
+ <front>false</front>
+ <back>false</back>
+ </cover-art-archive>
</release>
</release-list>
</metadata>';
@@ -121,6 +151,12 @@ ws_test 'browse releases via recording',
</text-representation>
<date>2004-01-15</date><country>JP</country><barcode>4988064173891</barcode>
<asin>B0000YGBSG</asin>
+ <cover-art-archive>
+ <artwork>false</artwork>
+ <count>0</count>
+ <front>false</front>
+ <back>false</back>
+ </cover-art-archive>
<label-info-list count="1">
<label-info>
<catalog-number>AVCD-17389</catalog-number>
@@ -138,6 +174,12 @@ ws_test 'browse releases via recording',
</text-representation>
<date>2004-01-15</date><country>JP</country><barcode>4988064173907</barcode>
<asin>B0000YG9NS</asin>
+ <cover-art-archive>
+ <artwork>false</artwork>
+ <count>0</count>
+ <front>false</front>
+ <back>false</back>
+ </cover-art-archive>
<label-info-list count="1">
<label-info>
<catalog-number>AVCD-17390</catalog-number>
@@ -164,6 +206,12 @@ ws_test 'browse releases via track artist',
<country>JP</country>
<barcode>4988064451180</barcode>
<asin>B0001FAD2O</asin>
+ <cover-art-archive>
+ <artwork>false</artwork>
+ <count>0</count>
+ <front>false</front>
+ <back>false</back>
+ </cover-art-archive>
</release>
</release-list>
</metadata>';
diff --git a/t/lib/t/MusicBrainz/Server/Controller/WS/2/JSON/BrowseReleases.pm b/t/lib/t/MusicBrainz/Server/Controller/WS/2/JSON/BrowseReleases.pm
index 06c17ba..fe96e38 100644
--- a/t/lib/t/MusicBrainz/Server/Controller/WS/2/JSON/BrowseReleases.pm
+++ b/t/lib/t/MusicBrainz/Server/Controller/WS/2/JSON/BrowseReleases.pm
@@ -41,6 +41,13 @@ test 'browse releases via artist (paging)' => sub {
status => "Official",
quality => "normal",
"text-representation" => { language => "eng", script => "Latn" },
+ "cover-art-archive" => {
+ artwork => JSON::false,
+ count => 0,
+ front => JSON::false,
+ back => JSON::false,
+ darkened => JSON::false,
+ },
date => "1999-09-23",
country => "US",
asin => "B00001IVAI",
@@ -67,6 +74,13 @@ test 'browse releases via label' => sub {
status => "Official",
quality => "normal",
"text-representation" => { language => "eng", script => "Latn" },
+ "cover-art-archive" => {
+ artwork => JSON::false,
+ count => 0,
+ front => JSON::false,
+ back => JSON::false,
+ darkened => JSON::false,
+ },
date => "2008-11-17",
country => "GB",
barcode => "600116822123",
@@ -83,6 +97,13 @@ test 'browse releases via label' => sub {
status => "Official",
quality => "normal",
"text-representation" => { language => "eng", script => "Latn" },
+ "cover-art-archive" => {
+ artwork => JSON::false,
+ count => 0,
+ front => JSON::false,
+ back => JSON::false,
+ darkened => JSON::false,
+ },
date => "2007-01-29",
country => "GB",
barcode => "600116817020",
@@ -110,6 +131,13 @@ test 'browse releases via release group' => sub {
status => "Official",
quality => "normal",
"text-representation" => { language => "jpn", script => "Jpan" },
+ "cover-art-archive" => {
+ artwork => JSON::false,
+ count => 0,
+ front => JSON::false,
+ back => JSON::false,
+ darkened => JSON::false,
+ },
date => "2001-07-04",
country => "JP",
barcode => "4942463511227",
@@ -123,6 +151,13 @@ test 'browse releases via release group' => sub {
status => "Pseudo-Release",
quality => "normal",
"text-representation" => { language => "jpn", script => "Latn" },
+ "cover-art-archive" => {
+ artwork => JSON::false,
+ count => 0,
+ front => JSON::false,
+ back => JSON::false,
+ darkened => JSON::false,
+ },
date => "2001-07-04",
country => "JP",
barcode => "4942463511227",
@@ -149,6 +184,13 @@ test 'browse releases via recording' => sub {
status => "Official",
quality => "normal",
"text-representation" => { language => "jpn", script => "Jpan" },
+ "cover-art-archive" => {
+ artwork => JSON::false,
+ count => 0,
+ front => JSON::false,
+ back => JSON::false,
+ darkened => JSON::false,
+ },
date => "2004-01-15",
country => "JP",
barcode => "4988064173891",
@@ -174,6 +216,13 @@ test 'browse releases via recording' => sub {
status => "Official",
quality => "normal",
"text-representation" => { language => "jpn", script => "Jpan" },
+ "cover-art-archive" => {
+ artwork => JSON::false,
+ count => 0,
+ front => JSON::false,
+ back => JSON::false,
+ darkened => JSON::false,
+ },
date => "2004-01-15",
country => "JP",
barcode => "4988064173907",
@@ -212,6 +261,13 @@ test 'browse releases via track artist' => sub {
status => "Official",
quality => "normal",
"text-representation" => { language => "eng", script => "Latn" },
+ "cover-art-archive" => {
+ artwork => JSON::false,
+ count => 0,
+ front => JSON::false,
+ back => JSON::false,
+ darkened => JSON::false,
+ },
date => "2004-03-17",
country => "JP",
barcode => "4988064451180",
diff --git a/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupDiscID.pm b/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupDiscID.pm
index 648538a..0bf4036 100644
--- a/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupDiscID.pm
+++ b/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupDiscID.pm
@@ -30,6 +30,12 @@ ws_test 'direct disc id lookup',
<title>Aerial</title>
<quality>normal</quality>
<date>2007</date>
+ <cover-art-archive>
+ <artwork>false</artwork>
+ <count>0</count>
+ <front>false</front>
+ <back>false</back>
+ </cover-art-archive>
<medium-list count="2">
<medium>
<title>A Sea of Honey</title>
@@ -64,6 +70,12 @@ ws_test 'lookup via toc',
<title>Aerial</title>
<quality>normal</quality>
<date>2008</date>
+ <cover-art-archive>
+ <artwork>false</artwork>
+ <count>0</count>
+ <front>false</front>
+ <back>false</back>
+ </cover-art-archive>
<medium-list count="2">
<medium>
<title>A Sea of Honey</title>
@@ -85,6 +97,12 @@ ws_test 'lookup via toc',
<title>Aerial</title>
<quality>normal</quality>
<date>2007</date>
+ <cover-art-archive>
+ <artwork>false</artwork>
+ <count>0</count>
+ <front>false</front>
+ <back>false</back>
+ </cover-art-archive>
<medium-list count="2">
<medium>
<title>A Sea of Honey</title>
diff --git a/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupNonCore.pm b/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupNonCore.pm
index db62063..b7d39b7 100644
--- a/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupNonCore.pm
+++ b/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupNonCore.pm
@@ -44,6 +44,12 @@ ws_test 'discid lookup with artist-credits',
</artist-credit>
<date>2004-01-15</date><country>JP</country>
<asin>B0000YGBSG</asin>
+ <cover-art-archive>
+ <artwork>false</artwork>
+ <count>0</count>
+ <front>false</front>
+ <back>false</back>
+ </cover-art-archive>
<medium-list count="1">
<medium>
<position>1</position>
diff --git a/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupRelationship.pm b/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupRelationship.pm
index 99118f2..6052c41 100644
--- a/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupRelationship.pm
+++ b/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupRelationship.pm
@@ -77,6 +77,12 @@ ws_test 'release lookup with release relationships',
</text-representation>
<date>2001-07-04</date><country>JP</country><barcode>4942463511227</barcode>
<asin>B00005LA6G</asin>
+ <cover-art-archive>
+ <artwork>false</artwork>
+ <count>0</count>
+ <front>false</front>
+ <back>false</back>
+ </cover-art-archive>
<relation-list target-type="release">
<relation type="transl-tracklisting">
<target>b3b7e934-445b-4c68-a097-730c6a6d47e6</target>
@@ -195,6 +201,12 @@ ws_test 'release lookup with recording-level relationships',
<country>US</country>
<barcode>844395014422</barcode>
<asin>B0015XAAY2</asin>
+ <cover-art-archive>
+ <artwork>false</artwork>
+ <count>0</count>
+ <front>false</front>
+ <back>false</back>
+ </cover-art-archive>
<medium-list count="1">
<medium>
<position>1</position>
diff --git a/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupTagsRatings.pm b/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupTagsRatings.pm
index 66bb8cc..bd2ce91 100644
--- a/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupTagsRatings.pm
+++ b/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupTagsRatings.pm
@@ -122,6 +122,12 @@ ws_test 'release lookup with release-groups, tags and ratings',
</release-group>
<date>2007-01-29</date><country>GB</country><barcode>600116817020</barcode>
<asin>B000KJTG6K</asin>
+ <cover-art-archive>
+ <artwork>false</artwork>
+ <count>0</count>
+ <front>false</front>
+ <back>false</back>
+ </cover-art-archive>
</release>
</metadata>';
commit d6936c0bc05e53587fc544dcdd8758eaa7e02a22
Author: Ian McEwen <[email protected]>
Date: Mon Jan 7 14:50:36 2013 -0700
MBS-4536: Don't output cover-art-archive data in JSON if it's not loaded
diff --git a/lib/MusicBrainz/Server/WebService/Serializer/JSON/2/Release.pm b/lib/MusicBrainz/Server/WebService/Serializer/JSON/2/Release.pm
index 98bc9c3..370decc 100644
--- a/lib/MusicBrainz/Server/WebService/Serializer/JSON/2/Release.pm
+++ b/lib/MusicBrainz/Server/WebService/Serializer/JSON/2/Release.pm
@@ -43,13 +43,15 @@ sub serialize
? $entity->packaging->name : JSON::null;
my $coverart = $stash->store($entity)->{'cover-art-archive'};
- $body{'cover-art-archive'} = {
- artwork => boolean($entity->cover_art_presence eq 'present'),
- darkened => boolean($entity->cover_art_presence eq 'darkened'),
- count => $coverart->{total},
- front => boolean($coverart->{front}),
- back => boolean($coverart->{back})
- };
+ if ($coverart) {
+ $body{'cover-art-archive'} = {
+ artwork => boolean($entity->cover_art_presence eq 'present'),
+ darkened => boolean($entity->cover_art_presence eq 'darkened'),
+ count => $coverart->{total},
+ front => boolean($coverart->{front}),
+ back => boolean($coverart->{back})
+ };
+ }
$body{"text-representation"} = {
script => $entity->script ? $entity->script->iso_code : JSON::null,
commit 00d8d7d6d3ba6256d9ac057b2b9756166f3ddf33
Author: Frederik "Freso" S. Olesen <[email protected]>
Date: Mon Jan 7 14:40:23 2013 +0100
MBS-5651: Fix unescaped quotes in msg* strings.
diff --git a/po/mb_server.de.po b/po/mb_server.de.po
index 3e4c7fd..e54e289 100644
--- a/po/mb_server.de.po
+++ b/po/mb_server.de.po
@@ -5968,8 +5968,8 @@ msgid "Reverse link phrase:"
msgstr "Beziehungsphrase rückwärts:"
#: ../root/release/edit/information.tt:153
-msgid "Review the <a href="{url}" target="_blank">list of packaging types</a> for help."
-msgstr "Konsultiere die <a href="{url}" target="_blank">Liste der Verpackungsarten</a> für Hilfe."
+msgid "Review the <a href=\"{url}\" target=\"_blank\">list of packaging types</a> for help."
+msgstr "Konsultiere die <a href=\"{url}\" target=\"_blank\">Liste der Verpackungsarten</a> für Hilfe."
#: ../root/layout.tt:79
msgid "Running: <span class=\"tooltip\" title=\"{msg}\">{branch} ({sha})</span>"
diff --git a/po/mb_server.el.po b/po/mb_server.el.po
index 1824bf8..691db4a 100644
--- a/po/mb_server.el.po
+++ b/po/mb_server.el.po
@@ -5958,7 +5958,7 @@ msgid "Reverse link phrase:"
msgstr ""
#: ../root/release/edit/information.tt:153
-msgid "Review the <a href="{url}" target="_blank">list of packaging types</a> for help."
+msgid "Review the <a href=\"{url}\" target=\"_blank\">list of packaging types</a> for help."
msgstr ""
#: ../root/layout.tt:79
diff --git a/po/mb_server.es.po b/po/mb_server.es.po
index a07c0f6..fdd9a4d 100644
--- a/po/mb_server.es.po
+++ b/po/mb_server.es.po
@@ -5963,8 +5963,8 @@ msgid "Reverse link phrase:"
msgstr "Frase de enlace inversa:"
#: ../root/release/edit/information.tt:153
-msgid "Review the <a href="{url}" target="_blank">list of packaging types</a> for help."
-msgstr "Consulta la <a href="{url}" target="_blank">lista de tipos de empaquetado</a> para saber más."
+msgid "Review the <a href=\"{url}\" target=\"_blank\">list of packaging types</a> for help."
+msgstr "Consulta la <a href=\"{url}\" target=\"_blank\">lista de tipos de empaquetado</a> para saber más."
#: ../root/layout.tt:79
msgid "Running: <span class=\"tooltip\" title=\"{msg}\">{branch} ({sha})</span>"
diff --git a/po/mb_server.et.po b/po/mb_server.et.po
index 542589a..f02807a 100644
--- a/po/mb_server.et.po
+++ b/po/mb_server.et.po
@@ -5953,8 +5953,8 @@ msgid "Reverse link phrase:"
msgstr ""
#: ../root/release/edit/information.tt:153
-msgid "Review the <a href="{url}" target="_blank">list of packaging types</a> for help."
-msgstr "Abi saamiseks vaata <a href="{url}" target="_blank">ümbrisetüüpide loendit</a>."
+msgid "Review the <a href=\"{url}\" target=\"_blank\">list of packaging types</a> for help."
+msgstr "Abi saamiseks vaata <a href=\"{url}\" target=\"_blank\">ümbrisetüüpide loendit</a>."
#: ../root/layout.tt:79
msgid "Running: <span class=\"tooltip\" title=\"{msg}\">{branch} ({sha})</span>"
diff --git a/po/mb_server.fi.po b/po/mb_server.fi.po
index 728dbae..aef7a69 100644
--- a/po/mb_server.fi.po
+++ b/po/mb_server.fi.po
@@ -5960,8 +5960,8 @@ msgid "Reverse link phrase:"
msgstr ""
#: ../root/release/edit/information.tt:153
-msgid "Review the <a href="{url}" target="_blank">list of packaging types</a> for help."
-msgstr "Tutustu <a href="{url}" target="_blank">listaan pakkaustyypeistä</a> saadaksesi apua."
+msgid "Review the <a href=\"{url}\" target=\"_blank\">list of packaging types</a> for help."
+msgstr "Tutustu <a href=\"{url}\" target=\"_blank\">listaan pakkaustyypeistä</a> saadaksesi apua."
#: ../root/layout.tt:79
msgid "Running: <span class=\"tooltip\" title=\"{msg}\">{branch} ({sha})</span>"
diff --git a/po/mb_server.fr_FR.po b/po/mb_server.fr_FR.po
index 6cc28f0..97c5f9e 100644
--- a/po/mb_server.fr_FR.po
+++ b/po/mb_server.fr_FR.po
@@ -5962,7 +5962,7 @@ msgid "Reverse link phrase:"
msgstr "Inverser le sens du lien : "
#: ../root/release/edit/information.tt:153
-msgid "Review the <a href="{url}" target="_blank">list of packaging types</a> for help."
+msgid "Review the <a href=\"{url}\" target=\"_blank\">list of packaging types</a> for help."
msgstr ""
#: ../root/layout.tt:79
diff --git a/po/mb_server.it.po b/po/mb_server.it.po
index 60e8a45..2ea1fea 100644
--- a/po/mb_server.it.po
+++ b/po/mb_server.it.po
@@ -5958,8 +5958,8 @@ msgid "Reverse link phrase:"
msgstr "Frase di collegamento inversa:"
#: ../root/release/edit/information.tt:153
-msgid "Review the <a href="{url}" target="_blank">list of packaging types</a> for help."
-msgstr "Consulta la <a href="{url}" target="_blank">lista di tipi di confezione</a> per saperne di più."
+msgid "Review the <a href=\"{url}\" target=\"_blank\">list of packaging types</a> for help."
+msgstr "Consulta la <a href=\"{url}\" target=\"_blank\">lista di tipi di confezione</a> per saperne di più."
#: ../root/layout.tt:79
msgid "Running: <span class=\"tooltip\" title=\"{msg}\">{branch} ({sha})</span>"
diff --git a/po/mb_server.nl.po b/po/mb_server.nl.po
index 088ee11..bf73dc6 100644
--- a/po/mb_server.nl.po
+++ b/po/mb_server.nl.po
@@ -5959,8 +5959,8 @@ msgid "Reverse link phrase:"
msgstr "Omgekeerde koppelzin:"
#: ../root/release/edit/information.tt:153
-msgid "Review the <a href="{url}" target="_blank">list of packaging types</a> for help."
-msgstr "Bekijk de <a href="{url}" target="_blank">lijst van verpakkingstypes</a> voor hulp."
+msgid "Review the <a href=\"{url}\" target=\"_blank\">list of packaging types</a> for help."
+msgstr "Bekijk de <a href=\"{url}\" target=\"_blank\">lijst van verpakkingstypes</a> voor hulp."
#: ../root/layout.tt:79
msgid "Running: <span class=\"tooltip\" title=\"{msg}\">{branch} ({sha})</span>"
commit 9511434f8be3d563f824999872a3ceab4a1e66c6
Author: Frederik "Freso" S. Olesen <[email protected]>
Date: Mon Jan 7 14:39:02 2013 +0100
MBS-5651: Escape quotes in msg* strings.
diff --git a/po/fixup/20130107-MBS-5651.py b/po/fixup/20130107-MBS-5651.py
index 230e4e0..2fd7375 100644
--- a/po/fixup/20130107-MBS-5651.py
+++ b/po/fixup/20130107-MBS-5651.py
@@ -19,7 +19,7 @@ def fix_string_1(old_string):
try:
new_string = old_string.split('{doc|')
new_string = [new_string[0]] + new_string[1].split('}')
- new_string = new_string[0] + '<a href="{url}" target="_blank">' + \
+ new_string = new_string[0] + r'<a href=\"{url}\" target=\"_blank\">' + \
new_string[1] + '</a>' + new_string[2]
print "... Replacing {old_string} with {new_string}.".format(**{
'old_string': repr(old_string),
commit e9e3c66ee4868a8863851bbbc1c2dc4327347d88
Merge: 74d5095 d45b07d
Author: Pavan Chander <[email protected]>
Date: Mon Jan 7 08:35:15 2013 -0500
Merge branch 'master' into mbs-5022-missing-entities
* master: (103 commits)
MBS-4115, support .png in contrib/ssssss.psgi.
MBS-5228, Partially revert 642022a2be24684eb246e7cd9bbd4dd2e794141d to fix wikidoc tests.
MBS-5678, Release group was missing from JSON release group release group relationships
MBS-5600, fix two internal server errors in /ws/2 json serialization.
Added test, meh
Adding lieder.net to whitelist and sidebar
Added the SongKong tagger
Added new amazon store ids
MBS-5672, use artist-credit as a key instead of artist_credit, in the /ws/2 json serialization of media.
MBS-3072, add IPIs to label and artist json serializations for /ws/2.
MBS-4627, add ->cover_art_id method to cover art edit classes to avoid having to know these details in Edit::Role::CoverArt.
When creating the 'page_index' function, specifically alias the 'musicbrainz.musicbrainz_unaccent' function
Added to yate to the home page too
Added the yate tagger
Update translations from transifex
Fix syntax in CoverArtArchive
Commiting local changes to ShowDBDefs and default DBDefs from astro
MBS-5637, find_or_insert() should look for links with the correct "ended" value for links with end dates.
MBS-5637, Add a relationship to the Edit::Recording::Merge test.
MBS-4627, use the correct image identifier in Edit::Role::CoverArt->adjust_edit_pending().
...
commit 911264ab6646fb940a64cb687458cd88c53d80b5
Author: Frederik "Freso" S. Olesen <[email protected]>
Date: Mon Jan 7 14:26:15 2013 +0100
MBS-5651: Run the revised script.
diff --git a/po/mb_server.de.po b/po/mb_server.de.po
index 6497667..3e4c7fd 100644
--- a/po/mb_server.de.po
+++ b/po/mb_server.de.po
@@ -4854,8 +4854,8 @@ msgstr "Bitte gebe Deine Tags in das Textfeld unten ein. Tags sind komma-separie
#: ../root/release/edit/information.tt:177
msgid ""
"Please enter the barcode of the release you are entering, see <a "
-"href=\"{url}\">Barcode</a> for more information."
-msgstr "Bitte gib den Strichcode der Veröffentlichung an, die Du eingibst. Siehe auch <a href=\"{url}\">Strichcode</a> zu weiteren Informationen."
+"href=\"{url}\" target=\"_blank\">Barcode</a> for more information."
+msgstr "Bitte gib den Strichcode der Veröffentlichung an, die Du eingibst. Siehe auch <a href=\"{url}\" target=\"_blank\">Strichcode</a> zu weiteren Informationen."
#: ../root/release/merge_search.tt:6
msgid ""
diff --git a/po/mb_server.el.po b/po/mb_server.el.po
index 820915a..1824bf8 100644
--- a/po/mb_server.el.po
+++ b/po/mb_server.el.po
@@ -4844,8 +4844,8 @@ msgstr "Παρακαλούμε εισάγετε τις ετικέτες στην
#: ../root/release/edit/information.tt:177
msgid ""
"Please enter the barcode of the release you are entering, see <a "
-"href=\"{url}\">Barcode</a> for more information."
-msgstr "Παρακαλούμε εισάγετε το barcode της κυκλοφορίας που εισάγετε, δείτε το <a href=\"{url}\">Barcode</a> για περισσότερες πληροφορίες."
+"href=\"{url}\" target=\"_blank\">Barcode</a> for more information."
+msgstr "Παρακαλούμε εισάγετε το barcode της κυκλοφορίας που εισάγετε, δείτε το <a href=\"{url}\" target=\"_blank\">Barcode</a> για περισσότερες πληροφορίες."
#: ../root/release/merge_search.tt:6
msgid ""
diff --git a/po/mb_server.es.po b/po/mb_server.es.po
index 519d97d..a07c0f6 100644
--- a/po/mb_server.es.po
+++ b/po/mb_server.es.po
@@ -4849,8 +4849,8 @@ msgstr "Introduce las etiquetas en el área de debajo. Las etiquetas se separan
#: ../root/release/edit/information.tt:177
msgid ""
"Please enter the barcode of the release you are entering, see <a "
-"href=\"{url}\">Barcode</a> for more information."
-msgstr "Introduce el código de barras de la publicación que estás añadiendo. Consulta <a href=\"{url}\">Código de barras</a> si quieres más información."
+"href=\"{url}\" target=\"_blank\">Barcode</a> for more information."
+msgstr "Introduce el código de barras de la publicación que estás añadiendo. Consulta <a href=\"{url}\" target=\"_blank\">Código de barras</a> si quieres más información."
#: ../root/release/merge_search.tt:6
msgid ""
diff --git a/po/mb_server.et.po b/po/mb_server.et.po
index 31a9f98..542589a 100644
--- a/po/mb_server.et.po
+++ b/po/mb_server.et.po
@@ -4839,8 +4839,8 @@ msgstr "Palun sisesta sildid allolevasse tekstialasse. Sildid tuleb eraldada kom
#: ../root/release/edit/information.tt:177
msgid ""
"Please enter the barcode of the release you are entering, see <a "
-"href=\"{url}\">Barcode</a> for more information."
-msgstr "Palun sisesta lisatava väljalaske vöötkood. Lisateabe saamiseks loe dokumentatsioonilehekülge <a href=\"{url}\">Vöötkood</a>."
+"href=\"{url}\" target=\"_blank\">Barcode</a> for more information."
+msgstr "Palun sisesta lisatava väljalaske vöötkood. Lisateabe saamiseks loe dokumentatsioonilehekülge <a href=\"{url}\" target=\"_blank\">Vöötkood</a>."
#: ../root/release/merge_search.tt:6
msgid ""
diff --git a/po/mb_server.fi.po b/po/mb_server.fi.po
index 78b800e..728dbae 100644
--- a/po/mb_server.fi.po
+++ b/po/mb_server.fi.po
@@ -4846,8 +4846,8 @@ msgstr "Lisää luokitukset alle, erottaen ne pilkulla toisistaan. Halutessasi v
#: ../root/release/edit/information.tt:177
msgid ""
"Please enter the barcode of the release you are entering, see <a "
-"href=\"{url}\">Barcode</a> for more information."
-msgstr "Syötä tämän julkaisun viivakoodi. Halutessasi katso lisätietoja <a href=\"{url}\">viivakoodista</a>."
+"href=\"{url}\" target=\"_blank\">Barcode</a> for more information."
+msgstr "Syötä tämän julkaisun viivakoodi. Halutessasi katso lisätietoja <a href=\"{url}\" target=\"_blank\">viivakoodista</a>."
#: ../root/release/merge_search.tt:6
msgid ""
diff --git a/po/mb_server.fr_FR.po b/po/mb_server.fr_FR.po
index ea11145..6cc28f0 100644
--- a/po/mb_server.fr_FR.po
+++ b/po/mb_server.fr_FR.po
@@ -4848,8 +4848,8 @@ msgstr "Entrez les marqueurs dans la zone de texte ci-dessous. Les marqueurs son
#: ../root/release/edit/information.tt:177
msgid ""
"Please enter the barcode of the release you are entering, see <a "
-"href=\"{url}\">Barcode</a> for more information."
-msgstr "Merci d'entrer le code-barre de la sortie que vous êtes en train de saisir. voir <a href=\"{url}\">la page code-barres</a> pour plus d'information."
+"href=\"{url}\" target=\"_blank\">Barcode</a> for more information."
+msgstr "Merci d'entrer le code-barre de la sortie que vous êtes en train de saisir. voir <a href=\"{url}\" target=\"_blank\">la page code-barres</a> pour plus d'information."
#: ../root/release/merge_search.tt:6
msgid ""
diff --git a/po/mb_server.it.po b/po/mb_server.it.po
index db9dbdc..60e8a45 100644
--- a/po/mb_server.it.po
+++ b/po/mb_server.it.po
@@ -4844,8 +4844,8 @@ msgstr "Inserisci i tag nell'area di testo qui sotto. I tag sono separati da una
#: ../root/release/edit/information.tt:177
msgid ""
"Please enter the barcode of the release you are entering, see <a "
-"href=\"{url}\">Barcode</a> for more information."
-msgstr "Inserisci il codice a barre della pubblicazione che stai aggiungendo. Consulta <a href=\"{url}\">Codice a barre</a> per avere più informazioni."
+"href=\"{url}\" target=\"_blank\">Barcode</a> for more information."
+msgstr "Inserisci il codice a barre della pubblicazione che stai aggiungendo. Consulta <a href=\"{url}\" target=\"_blank\">Codice a barre</a> per avere più informazioni."
#: ../root/release/merge_search.tt:6
msgid ""
diff --git a/po/mb_server.nl.po b/po/mb_server.nl.po
index 23b0f0a..088ee11 100644
--- a/po/mb_server.nl.po
+++ b/po/mb_server.nl.po
@@ -4845,8 +4845,8 @@ msgstr "Voer etiketten alstublieft in het veld hieronder in. Etiketten worden ge
#: ../root/release/edit/information.tt:177
msgid ""
"Please enter the barcode of the release you are entering, see <a "
-"href=\"{url}\">Barcode</a> for more information."
-msgstr "Voert u alstublieft de streepjescode van de uitgave die u aan het toevoegen bent in. Zie <a href=\"{url}\">Streepjescode</a> voor meer informatie."
+"href=\"{url}\" target=\"_blank\">Barcode</a> for more information."
+msgstr "Voert u alstublieft de streepjescode van de uitgave die u aan het toevoegen bent in. Zie <a href=\"{url}\" target=\"_blank\">Streepjescode</a> voor meer informatie."
#: ../root/release/merge_search.tt:6
msgid ""
commit 041121a8112c734c71bc781bbb327d65ef3f4004
Author: Frederik "Freso" S. Olesen <[email protected]>
Date: Mon Jan 7 14:24:31 2013 +0100
MBS-5651: Handle the "barcode" link as well.
diff --git a/po/fixup/20130107-MBS-5651.py b/po/fixup/20130107-MBS-5651.py
index 8decd96..230e4e0 100644
--- a/po/fixup/20130107-MBS-5651.py
+++ b/po/fixup/20130107-MBS-5651.py
@@ -4,18 +4,22 @@
Namely, change:
Review the {doc|list of packaging types} for help.
+ - and -
+ Please enter the barcode of the release you are entering, see <a href="{url}">Barcode</a> for more information.
Into:
Review the <a href="{url}" target="_blank">list of packaging types</a> for help.
+ - and -
+ Please enter the barcode of the release you are entering, see <a href="{url}" target="_blank">Barcode</a> for more information.
"""
import os
-def fix_string(old_string):
- """Replaces the old text with the new text."""
+def fix_string_1(old_string):
+ """Replaces "{doc|..." with "<a href=..."."""
try:
new_string = old_string.split('{doc|')
new_string = [new_string[0]] + new_string[1].split('}')
- new_string = new_string[0] + '<a href="{url}" target="_blank">' +\
+ new_string = new_string[0] + '<a href="{url}" target="_blank">' + \
new_string[1] + '</a>' + new_string[2]
print "... Replacing {old_string} with {new_string}.".format(**{
'old_string': repr(old_string),
@@ -28,15 +32,43 @@ def fix_string(old_string):
})
return new_string
+def fix_string_2(old_string):
+ """Adds target="_blank" after href="{url}"."""
+ new_string = old_string.replace(r'href=\"{url}\"',
+ r'href=\"{url}\" target=\"_blank\"')
+ print "... Replacing {old_string} with {new_string}.".format(**{
+ 'old_string': repr(old_string),
+ 'new_string': repr(new_string),
+ })
+ return new_string
+
def handle_file(pofile):
"""PO-file in, altered PO-file out."""
+
lines = []
+ check_string_1 = r'{doc|list of packaging types}'
+ check_string_2a = r'Please enter the barcode of the release you are entering, see <a '
+ check_string_2b = r'href=\"{url}\">Barcode</a> for more information.'
+
with open(pofile, 'r') as f:
for line in f:
- if line[:5] == 'msgid' and '{doc|list of packaging types}' in line:
- msgid = fix_string(line)
- msgstr = fix_string(f.next())
+ if line[:5] == 'msgid' and check_string_1 in line:
+ msgid = fix_string_1(line)
+ msgstr = fix_string_1(f.next())
lines = lines + [msgid] + [msgstr]
+ # Check whether the msgid is split over several lines.
+ elif r'msgid ""' in line:
+ lines = lines + [line]
+ line = f.next()
+ if check_string_2a in line:
+ lines = lines + [line]
+ line = f.next()
+ if check_string_2b in line:
+ msgid = fix_string_2(line)
+ msgstr = fix_string_2(f.next())
+ lines = lines + [msgid] + [msgstr]
+ else:
+ lines = lines + [line]
else:
lines = lines + [line]
with open(pofile, 'w') as f:
commit e6a0717337c0ace9ae85390a11c24b9b913aadb4
Author: Frederik "Freso" S. Olesen <[email protected]>
Date: Mon Jan 7 13:23:33 2013 +0100
MBS-5651: Remove a trailing space in the string cleanup script.
diff --git a/po/fixup/20130107-MBS-5651.py b/po/fixup/20130107-MBS-5651.py
index 3052c36..8decd96 100644
--- a/po/fixup/20130107-MBS-5651.py
+++ b/po/fixup/20130107-MBS-5651.py
@@ -35,7 +35,7 @@ def handle_file(pofile):
for line in f:
if line[:5] == 'msgid' and '{doc|list of packaging types}' in line:
msgid = fix_string(line)
- msgstr = fix_string(f.next())
+ msgstr = fix_string(f.next())
lines = lines + [msgid] + [msgstr]
else:
lines = lines + [line]
commit c1e8ded33b3861d13fa1defb95f6b59fa56cfb43
Author: Frederik "Freso" S. Olesen <[email protected]>
Date: Mon Jan 7 13:13:33 2013 +0100
MBS-5651: Updated *.po with the altered string.
diff --git a/po/mb_server.de.po b/po/mb_server.de.po
index 99199d7..6497667 100644
--- a/po/mb_server.de.po
+++ b/po/mb_server.de.po
@@ -5968,8 +5968,8 @@ msgid "Reverse link phrase:"
msgstr "Beziehungsphrase rückwärts:"
#: ../root/release/edit/information.tt:153
-msgid "Review the {doc|list of packaging types} for help."
-msgstr "Konsultiere die {doc|Liste der Verpackungsarten} für Hilfe."
+msgid "Review the <a href="{url}" target="_blank">list of packaging types</a> for help."
+msgstr "Konsultiere die <a href="{url}" target="_blank">Liste der Verpackungsarten</a> für Hilfe."
#: ../root/layout.tt:79
msgid "Running: <span class=\"tooltip\" title=\"{msg}\">{branch} ({sha})</span>"
diff --git a/po/mb_server.el.po b/po/mb_server.el.po
index 167383b..820915a 100644
--- a/po/mb_server.el.po
+++ b/po/mb_server.el.po
@@ -5958,7 +5958,7 @@ msgid "Reverse link phrase:"
msgstr ""
#: ../root/release/edit/information.tt:153
-msgid "Review the {doc|list of packaging types} for help."
+msgid "Review the <a href="{url}" target="_blank">list of packaging types</a> for help."
msgstr ""
#: ../root/layout.tt:79
diff --git a/po/mb_server.es.po b/po/mb_server.es.po
index dba3844..519d97d 100644
--- a/po/mb_server.es.po
+++ b/po/mb_server.es.po
@@ -5963,8 +5963,8 @@ msgid "Reverse link phrase:"
msgstr "Frase de enlace inversa:"
#: ../root/release/edit/information.tt:153
-msgid "Review the {doc|list of packaging types} for help."
-msgstr "Consulta la {doc|lista de tipos de empaquetado} para saber más."
+msgid "Review the <a href="{url}" target="_blank">list of packaging types</a> for help."
+msgstr "Consulta la <a href="{url}" target="_blank">lista de tipos de empaquetado</a> para saber más."
#: ../root/layout.tt:79
msgid "Running: <span class=\"tooltip\" title=\"{msg}\">{branch} ({sha})</span>"
diff --git a/po/mb_server.et.po b/po/mb_server.et.po
index 43ac8d9..31a9f98 100644
--- a/po/mb_server.et.po
+++ b/po/mb_server.et.po
@@ -5953,8 +5953,8 @@ msgid "Reverse link phrase:"
msgstr ""
#: ../root/release/edit/information.tt:153
-msgid "Review the {doc|list of packaging types} for help."
-msgstr "Abi saamiseks vaata {doc|ümbrisetüüpide loendit}."
+msgid "Review the <a href="{url}" target="_blank">list of packaging types</a> for help."
+msgstr "Abi saamiseks vaata <a href="{url}" target="_blank">ümbrisetüüpide loendit</a>."
#: ../root/layout.tt:79
msgid "Running: <span class=\"tooltip\" title=\"{msg}\">{branch} ({sha})</span>"
diff --git a/po/mb_server.fi.po b/po/mb_server.fi.po
index fb6597b..78b800e 100644
--- a/po/mb_server.fi.po
+++ b/po/mb_server.fi.po
@@ -5960,8 +5960,8 @@ msgid "Reverse link phrase:"
msgstr ""
#: ../root/release/edit/information.tt:153
-msgid "Review the {doc|list of packaging types} for help."
-msgstr "Tutustu {doc|listaan pakkaustyypeistä} saadaksesi apua."
+msgid "Review the <a href="{url}" target="_blank">list of packaging types</a> for help."
+msgstr "Tutustu <a href="{url}" target="_blank">listaan pakkaustyypeistä</a> saadaksesi apua."
#: ../root/layout.tt:79
msgid "Running: <span class=\"tooltip\" title=\"{msg}\">{branch} ({sha})</span>"
diff --git a/po/mb_server.fr_FR.po b/po/mb_server.fr_FR.po
index bc2a9e5..ea11145 100644
--- a/po/mb_server.fr_FR.po
+++ b/po/mb_server.fr_FR.po
@@ -5962,7 +5962,7 @@ msgid "Reverse link phrase:"
msgstr "Inverser le sens du lien : "
#: ../root/release/edit/information.tt:153
-msgid "Review the {doc|list of packaging types} for help."
+msgid "Review the <a href="{url}" target="_blank">list of packaging types</a> for help."
msgstr ""
#: ../root/layout.tt:79
diff --git a/po/mb_server.it.po b/po/mb_server.it.po
index 3e2e23f..db9dbdc 100644
--- a/po/mb_server.it.po
+++ b/po/mb_server.it.po
@@ -5958,8 +5958,8 @@ msgid "Reverse link phrase:"
msgstr "Frase di collegamento inversa:"
#: ../root/release/edit/information.tt:153
-msgid "Review the {doc|list of packaging types} for help."
-msgstr "Consulta la {doc|lista di tipi di confezione} per saperne di più."
+msgid "Review the <a href="{url}" target="_blank">list of packaging types</a> for help."
+msgstr "Consulta la <a href="{url}" target="_blank">lista di tipi di confezione</a> per saperne di più."
#: ../root/layout.tt:79
msgid "Running: <span class=\"tooltip\" title=\"{msg}\">{branch} ({sha})</span>"
diff --git a/po/mb_server.nl.po b/po/mb_server.nl.po
index aa0a2cb..23b0f0a 100644
--- a/po/mb_server.nl.po
+++ b/po/mb_server.nl.po
@@ -5959,8 +5959,8 @@ msgid "Reverse link phrase:"
msgstr "Omgekeerde koppelzin:"
#: ../root/release/edit/information.tt:153
-msgid "Review the {doc|list of packaging types} for help."
-msgstr "Bekijk de {doc|lijst van verpakkingstypes} voor hulp."
+msgid "Review the <a href="{url}" target="_blank">list of packaging types</a> for help."
+msgstr "Bekijk de <a href="{url}" target="_blank">lijst van verpakkingstypes</a> voor hulp."
#: ../root/layout.tt:79
msgid "Running: <span class=\"tooltip\" title=\"{msg}\">{branch} ({sha})</span>"
commit fe8f2a39159d24927da1aead28d3d88b3975c903
Author: Frederik "Freso" S. Olesen <[email protected]>
Date: Mon Jan 7 13:12:12 2013 +0100
MBS-5651: Add script to fix changed strings for translators' convenience.
Run script in po/ directory.
diff --git a/po/fixup/20130107-MBS-5651.py b/po/fixup/20130107-MBS-5651.py
new file mode 100644
index 0000000..3052c36
--- /dev/null
+++ b/po/fixup/20130107-MBS-5651.py
@@ -0,0 +1,55 @@
+#!/usr/bin/python2
+# -*- coding: utf-8 -*-
+"""Fix strings for translators related to code changes for MBS-5651.
+
+Namely, change:
+ Review the {doc|list of packaging types} for help.
+Into:
+ Review the <a href="{url}" target="_blank">list of packaging types</a> for help.
+"""
+
+import os
+
+def fix_string(old_string):
+ """Replaces the old text with the new text."""
+ try:
+ new_string = old_string.split('{doc|')
+ new_string = [new_string[0]] + new_string[1].split('}')
+ new_string = new_string[0] + '<a href="{url}" target="_blank">' +\
+ new_string[1] + '</a>' + new_string[2]
+ print "... Replacing {old_string} with {new_string}.".format(**{
+ 'old_string': repr(old_string),
+ 'new_string': repr(new_string),
+ })
+ except IndexError:
+ new_string = old_string
+ print "... Nothing to replace in {string}.".format(**{
+ 'string': old_string,
+ })
+ return new_string
+
+def handle_file(pofile):
+ """PO-file in, altered PO-file out."""
+ lines = []
+ with open(pofile, 'r') as f:
+ for line in f:
+ if line[:5] == 'msgid' and '{doc|list of packaging types}' in line:
+ msgid = fix_string(line)
+ msgstr = fix_string(f.next())
+ lines = lines + [msgid] + [msgstr]
+ else:
+ lines = lines + [line]
+ with open(pofile, 'w') as f:
+ print "Writing new {filename}.".format(**{'filename': pofile})
+ f.writelines(lines)
+
+def main():
+ """Core script logic."""
+ for pofile in os.listdir(os.curdir):
+ if pofile[:10] == 'mb_server.' and pofile[-3:] == '.po':
+ print "Opening {filename}.".format(**{'filename': pofile})
+ handle_file(pofile)
+
+if __name__ == '__main__':
+ print os.path.abspath('.')
+ main()
commit b0e91e2b4d4dd5e0aa51cbfd33d563f3df163ce3
Author: Frederik "Freso" S. Olesen <[email protected]>
Date: Sun Jan 6 17:05:28 2013 +0000
MBS-5651: Make barcode and packaging links in release editor open in new windows.
diff --git a/root/release/edit/information.tt b/root/release/edit/information.tt
index 6302686..dda5d31 100644
--- a/root/release/edit/information.tt
+++ b/root/release/edit/information.tt
@@ -150,7 +150,8 @@
<div class="packaging-container" style="display: none">
<div class="packaging bubble">
<p>
- [% l('Review the {doc|list of packaging types} for help.', { doc => doc_link('Release/Packaging') }) %]
+ [% l('Review the <a href="{url}" target="_blank">list of packaging types</a> for help.',
+ { url => doc_link('Release/Packaging') }) %]
</p>
</div>
</div>
@@ -174,7 +175,8 @@
<div class="barcode-container" style="display: none">
<div class="barcode bubble">
<p>
- [% l('Please enter the barcode of the release you are entering, see <a href="{url}">Barcode</a> for more information.', { url => c.uri_for('/doc/Barcode') }) %]
+ [% l('Please enter the barcode of the release you are entering, see <a href="{url}" target="_blank">Barcode</a> for more information.',
+ { url => doc_link('Barcode') }) %]
</p>
<p class="barcode-message"></p>
<p class="barcode-confirm">
@@ -216,4 +218,3 @@
</div>
[%- END -%]
-
commit 4d46c76030cf48968970dd8acf1c2a1a5e239f28
Author: Frederik "Freso" S. Olesen <[email protected]>
Date: Sun Jan 6 14:38:56 2013 +0000
MBS-5699: Make CD stubs use "Comment" for comments.
Code wise, they were already called comments - e.g., for variables and
classes, but for some reason not in the user interface text. Curious.
diff --git a/root/cdstub/edit_form.tt b/root/cdstub/edit_form.tt
index 23ced5d..f4960ac 100644
--- a/root/cdstub/edit_form.tt
+++ b/root/cdstub/edit_form.tt
@@ -5,7 +5,7 @@
[% form_row_text_long(r, 'title', l('Title:')) %]
[% form_row_text_long(r, 'artist', l('Artist:')) %]
[% form_row_text(r, 'barcode', l('Barcode:')) %]
- [% form_row_text_long(r, 'comment', l('Disambiguation:')) %]
+ [% form_row_text_long(r, 'comment', l('Comment:')) %]
[% form_row_checkbox(r, 'multiple_artists', l('This CD has tracks from more than one artist (e.g. a compilation CD)')) %]
</fieldset>
<fieldset>
diff --git a/root/cdstub/index.tt b/root/cdstub/index.tt
index f0be505..f2dd923 100644
--- a/root/cdstub/index.tt
+++ b/root/cdstub/index.tt
@@ -1,6 +1,6 @@
[%- WRAPPER 'cdstub/layout.tt' page='index' -%]
[% IF cdstubtoc.cdstub.comment %]
- <h2>[% l('Disambiguation') %]</h2>
+ <h2>[% l('Comment') %]</h2>
<p>[% cdstubtoc.cdstub.comment %]</p>
[% END %]
commit 4cd55df1a13d24553d3a309df2159ca94fc3883f
Author: Frederik "Freso" S. Olesen <[email protected]>
Date: Sun Jan 6 08:46:20 2013 +0000
MBS-5606: Implement STYLE-160 in code (TheSession.org).
diff --git a/lib/MusicBrainz/Server/Data/URL.pm b/lib/MusicBrainz/Server/Data/URL.pm
index 13f7c56..30584dc 100644
--- a/lib/MusicBrainz/Server/Data/URL.pm
+++ b/lib/MusicBrainz/Server/Data/URL.pm
@@ -53,6 +53,7 @@ my %URL_SPECIALIZATIONS = (
'SoundCloud' => qr{^https?://(?:www.)?soundcloud.com/}i,
'SpiritOfMetal' => qr{^https?://(?:www.)?spirit-of-metal.com/}i,
'Theatricalia' => qr{^https?://(?:www.)?theatricalia.com/}i,
+ 'TheSession' => qr{^https?://(?:www.)?thesession.org/}i,
'Trove' => qr{^https?://(?:www.)?trove.nla.gov.au/}i,
'Twitter' => qr{^https?://(?:www.)?twitter.com/}i,
'VGMdb' => qr{^https?://(?:www.)?vgmdb.net/}i,
diff --git a/lib/MusicBrainz/Server/Entity/URL/TheSession.pm b/lib/MusicBrainz/Server/Entity/URL/TheSession.pm
new file mode 100644
index 0000000..760d576
--- /dev/null
+++ b/lib/MusicBrainz/Server/Entity/URL/TheSession.pm
@@ -0,0 +1,36 @@
+package MusicBrainz::Server::Entity::URL::TheSession;
+
+use Moose;
+
+extends 'MusicBrainz::Server::Entity::URL';
+with 'MusicBrainz::Server::Entity::URL::Sidebar';
+
+sub sidebar_name {
+ my $self = shift;
+
+ return "The Session";
+}
+
+__PACKAGE__->meta->make_immutable;
+no Moose;
+1;
+
+=head1 COPYRIGHT
+
+Copyright (C) 2012 MetaBrainz Foundation
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+=cut
diff --git a/root/components/common-macros.tt b/root/components/common-macros.tt
index ee84d23..850be65 100644
--- a/root/components/common-macros.tt
+++ b/root/components/common-macros.tt
@@ -721,6 +721,7 @@ END -%]
ELSIF url.url.host.search('trove.nla.gov.au'); 'trove';
ELSIF url.url.host.search('rockinchina.com'); 'ric';
ELSIF url.url.host.search('dhhu.dk'); 'dhhu';
+ ELSIF url.url.host.search('thesession.org'); 'thesession';
ELSIF url.url.as_string.search('recmusic.org/lieder'); 'lieder';
ELSE; '';
END -%]
diff --git a/root/static/images/favicons/thesession-16.png b/root/static/images/favicons/thesession-16.png
new file mode 100644
index 0000000..0112389
Binary files /dev/null and b/root/static/images/favicons/thesession-16.png differ
diff --git a/root/static/scripts/edit/MB/Control/URLCleanup.js b/root/static/scripts/edit/MB/Control/URLCleanup.js
index 74966f8..677d5b2 100644
--- a/root/static/scripts/edit/MB/Control/URLCleanup.js
+++ b/root/static/scripts/edit/MB/Control/URLCleanup.js
@@ -373,7 +373,7 @@ MB.constants.CLEANUPS = {
type: MB.constants.LINK_TYPES.vgmdb
},
otherdatabases: {
- match: new RegExp("^(https?://)?(www\\.)?(rateyourmusic\\.com/|worldcat\\.org/|musicmoz\\.org/|45cat\\.com/|musik-sammler\\.de/|discografia\\.dds\\.it/|tallinn\\.ester\\.ee/|tartu\\.ester\\.ee/|encyclopedisque\\.fr/|discosdobrasil\\.com\\.br/|isrc\\.ncl\\.edu\\.tw/|rolldabeats\\.com/|psydb\\.net/|metal-archives\\.com/|spirit-of-metal\\.com/|ibdb\\.com/|lortel.\\org/|theatricalia\\.com/|ocremix\\.org/|trove\\.nla\\.gov\\.au/|(wiki\\.)?rockinchina\\.com|(www\\.)?dhhu\\.dk)", "i"),
+ match: new RegExp("^(https?://)?(www\\.)?(rateyourmusic\\.com/|worldcat\\.org/|musicmoz\\.org/|45cat\\.com/|musik-sammler\\.de/|discografia\\.dds\\.it/|tallinn\\.ester\\.ee/|tartu\\.ester\\.ee/|encyclopedisque\\.fr/|discosdobrasil\\.com\\.br/|isrc\\.ncl\\.edu\\.tw/|rolldabeats\\.com/|psydb\\.net/|metal-archives\\.com/|spirit-of-metal\\.com/|ibdb\\.com/|lortel.\\org/|theatricalia\\.com/|ocremix\\.org/|trove\\.nla\\.gov\\.au/|(wiki\\.)?rockinchina\\.com|(www\\.)?dhhu\\.dk|thesession\\.org)", "i"),
type: MB.constants.LINK_TYPES.otherdatabases,
clean: function(url) {
//Removing cruft from Worldcat URLs
@@ -388,6 +388,8 @@ MB.constants.CLEANUPS = {
url = url.replace(/^(?:https?:\/\/)?(wiki|www)\.rockinchina\.com\/w\/(.*)+$/, "http://www.rockinchina.com/w/$2");
//Standardising DHHU
url = url.replace(/^(?:https?:\/\/)?(www\.)?dhhu\.dk\/w\/(.*)+$/, "http://www.dhhu.dk/w/$2");
+ //Standardising The Session
+ url = url.replace(/^(?:https?:\/\/)?(www\.)?thesession\.org\/([^\/]+)(\/.*)?\/([0-9]+)+(#.*)*$/, "http://thesession.org/$2/$4");
return url;
}
}
diff --git a/root/static/scripts/tests/Control/URLCleanup.js b/root/static/scripts/tests/Control/URLCleanup.js
index 3a81b83..e633c94 100644
--- a/root/static/scripts/tests/Control/URLCleanup.js
+++ b/root/static/scripts/tests/Control/URLCleanup.js
@@ -54,6 +54,15 @@ MB.tests.URLCleanup.GuessType = function() {
'http://www.dhhu.dk/w/Jonny_Hefty_%26_Gratismixtape.dk_pr%C3%A6senterer_Actionspeax_-_Louder_Than_Words_Mixtape,_MP3/',
MB.constants.LINK_TYPES.otherdatabases.release
],
+ // The Session
+ [
+ 'release_group', 'http://thesession.org/recordings/1488',
+ MB.constants.LINK_TYPES.otherdatabases.release_group
+ ],
+ [
+ 'work', 'http://thesession.org/tunes/2305',
+ MB.constants.LINK_TYPES.otherdatabases.work
+ ],
[
'artist', 'http://www.imdb.com/name/nm1539156/',
MB.constants.LINK_TYPES.imdb.artist
@@ -262,6 +271,22 @@ MB.tests.URLCleanup.GuessType = function() {
'http://www.dhhu.dk/w/Sort_Stue',
'artist'
],
+ // The Session
+ [
+ 'http://www.thesession.org/tunes/display/2305',
+ 'http://thesession.org/tunes/2305',
+ 'work'
+ ],
+ [
+ 'https://www.thesession.org/recordings/display/1488',
+ 'http://thesession.org/recordings/1488',
+ 'release_group'
+ ],
+ [
+ 'thesession.org/recordings/1488#comment283364',
+ 'http://thesession.org/recordings/1488',
+ 'release_group'
+ ],
[
'http://creativecommons.org/publicdomain/zero/1.0/legalcode',
'http://creativecommons.org/publicdomain/zero/1.0/',
diff --git a/root/static/styles/layout.css b/root/static/styles/layout.css
index 4b73fb4..8dac874 100644
--- a/root/static/styles/layout.css
+++ b/root/static/styles/layout.css
@@ -563,6 +563,10 @@ div.warning img.warning {
background-image: url("../images/favicons/dhhu-16.png");
}
+#sidebar ul.external_links li.thesession {
+ background-image: url("../images/favicons/thesession-16.png");
+}
+
#sidebar ul.external_links li.lieder {
background-image: url("../images/favicons/lieder-16.png");
}
commit e3e7893631c1dc5adbb82e15abe30a969c087a07
Author: Ian McEwen <[email protected]>
Date: Sat Jan 5 19:36:05 2013 -0700
MBS-5447: use 250px thumbnails now that quality is reasonable again (reverts MBS-4674)
diff --git a/root/components/common-macros.tt b/root/components/common-macros.tt
index ee84d23..bd5ad07 100644
--- a/root/components/common-macros.tt
+++ b/root/components/common-macros.tt
@@ -82,12 +82,12 @@ END; -%]
[%- MACRO display_artwork(artwork, fallback, message, rel) BLOCK -%]
<a title="[% artwork_hover(artwork) %]" href="[% artwork.image %]"[% IF rel %] rel="[% rel %]"[% END %] class="thickbox">
[%- IF no_javascript -%]
- <img src="[% artwork.large_thumbnail %]" />
+ <img src="[% artwork.small_thumbnail %]" />
[%- ELSE -%]
<img title="[% artwork_hover(artwork) %]" />
<script>
$('img').last ().bind ('error', function (event) {
- if ($(this).attr ("src") === "[% artwork.large_thumbnail %]")
+ if ($(this).attr ("src") === "[% artwork.small_thumbnail %]")
{
$(this).attr ("src", "[% artwork.image %]");
}
@@ -103,7 +103,7 @@ END; -%]
[%- message ? message : l('Image not available yet, please try again in a few minutes.') | js -%]
<\/em>');
}
- }).attr ("src", "[% artwork.large_thumbnail %]");
+ }).attr ("src", "[% artwork.small_thumbnail %]");
</script>
[%- END -%]
</a>
commit 8cca844437da56049acb9ba74bbb1ae8b3956a6b
Author: Ian McEwen <[email protected]>
Date: Fri Jan 4 21:34:09 2013 -0700
Add support for hooks in LoadReplicationChanges, by way of a 'hooks' script; add a post-process hook and a sample hooks script.
diff --git a/admin/replication/LoadReplicationChanges b/admin/replication/LoadReplicationChanges
index c78a080..1e416aa 100755
--- a/admin/replication/LoadReplicationChanges
+++ b/admin/replication/LoadReplicationChanges
@@ -327,6 +327,12 @@ APPLY_CHANGES:
system "$FindBin::Bin/ProcessReplicationChanges", @process_opts;
exit $? if $?;
+if (-x "$FindBin::Bin/hooks") {
+ print localtime() . " : Running post-process hook\n";
+ system "$FindBin::Bin/hooks post-process";
+ exit $? if $?;
+}
+
# Check that current_replication_sequence has gone up by one
# Also last_replication_date should match TIMESTAMP
$LAST_REPLICATION_SEQUENCE = $iReplicationSequence + 1
diff --git a/admin/replication/hooks.sample b/admin/replication/hooks.sample
new file mode 100755
index 0000000..3ee0df6
--- /dev/null
+++ b/admin/replication/hooks.sample
@@ -0,0 +1,13 @@
+#!/bin/bash
+# This is a sample hook file. In its current form it won't do much, but if
+# copied to 'hooks' it will echo 'one packet processed!' after each packet.
+# Alternatively, you could add calls to scripts you'd like to be run after
+# each packet, perhaps to update some derived information.
+
+case "$1" in
+ post-process)
+ echo 'one packet processed!';
+ ;;
+ *)
+ echo "unknown hook $1";
+esac
commit 273a40193dd1931c3697ab375bb8eadad0956e8c
Author: Ian McEwen <[email protected]>
Date: Thu Jan 3 16:35:17 2013 -0700
Fix up existing JSON LookupRelease tests.
diff --git a/t/lib/t/MusicBrainz/Server/Controller/WS/2/JSON/LookupRelease.pm b/t/lib/t/MusicBrainz/Server/Controller/WS/2/JSON/LookupRelease.pm
index 029b44a..ddfb953 100644
--- a/t/lib/t/MusicBrainz/Server/Controller/WS/2/JSON/LookupRelease.pm
+++ b/t/lib/t/MusicBrainz/Server/Controller/WS/2/JSON/LookupRelease.pm
@@ -24,6 +24,13 @@ test 'basic release lookup' => sub {
language => "jpn",
script => "Latn",
},
+ "cover-art-archive" => {
+ artwork => JSON::false,
+ count => 0,
+ front => JSON::false,
+ back => JSON::false,
+ darkened => JSON::false,
+ },
date => "2001-07-04",
country => "JP",
barcode => "4942463511227",
@@ -50,6 +57,13 @@ test 'basic release lookup, inc=annotation' => sub {
language => "eng",
script => "Latn",
},
+ "cover-art-archive" => {
+ artwork => JSON::false,
+ count => 0,
+ front => JSON::false,
+ back => JSON::false,
+ darkened => JSON::false,
+ },
date => "2007-01-29",
country => "GB",
barcode => "600116817020",
@@ -79,6 +93,13 @@ test 'basic release with tags' => sub {
language => "jpn",
script => "Latn",
},
+ "cover-art-archive" => {
+ artwork => JSON::false,
+ count => 0,
+ front => JSON::false,
+ back => JSON::false,
+ darkened => JSON::false,
+ },
date => "2001-07-04",
country => "JP",
barcode => "4942463511227",
@@ -112,6 +133,13 @@ test 'basic release with collections' => sub {
language => "jpn",
script => "Latn",
},
+ "cover-art-archive" => {
+ artwork => JSON::false,
+ count => 0,
+ front => JSON::false,
+ back => JSON::false,
+ darkened => JSON::false,
+ },
date => "2001-07-04",
country => "JP",
barcode => "4942463511227",
@@ -142,6 +170,13 @@ test 'release lookup with artists + aliases' => sub {
disambiguation => "",
packaging => JSON::null,
"text-representation" => { language => "eng", script => "Latn" },
+ "cover-art-archive" => {
+ artwork => JSON::false,
+ count => 0,
+ front => JSON::false,
+ back => JSON::false,
+ darkened => JSON::false,
+ },
"artist-credit" => [
{
name => "m-flo",
@@ -183,6 +218,13 @@ test 'release lookup with labels and recordings' => sub {
disambiguation => "",
packaging => JSON::null,
"text-representation" => { language => "eng", script => "Latn" },
+ "cover-art-archive" => {
+ artwork => JSON::false,
+ count => 0,
+ front => JSON::false,
+ back => JSON::false,
+ darkened => JSON::false,
+ },
date => "2004-03-17",
country => "JP",
barcode => "4988064451180",
@@ -257,6 +299,13 @@ test 'release lookup with release-groups' => sub {
disambiguation => "",
packaging => JSON::null,
"text-representation" => { language => "eng", script => "Latn" },
+ "cover-art-archive" => {
+ artwork => JSON::false,
+ count => 0,
+ front => JSON::false,
+ back => JSON::false,
+ darkened => JSON::false,
+ },
date => "2004-03-17",
country => "JP",
barcode => "4988064451180",
@@ -313,6 +362,13 @@ test 'release lookup with discids and puids' => sub {
language => "jpn",
script => "Latn",
},
+ "cover-art-archive" => {
+ artwork => JSON::false,
+ count => 0,
+ front => JSON::false,
+ back => JSON::false,
+ darkened => JSON::false,
+ },
date => "2001-07-04",
country => "JP",
barcode => "4942463511227",
@@ -382,6 +438,13 @@ test 'release lookup, barcode is NULL' => sub {
language => "eng",
script => "Latn",
},
+ "cover-art-archive" => {
+ artwork => JSON::false,
+ count => 0,
+ front => JSON::false,
+ back => JSON::false,
+ darkened => JSON::false,
+ },
date => "1999-09-23",
country => "US",
barcode => JSON::null,
@@ -406,6 +469,13 @@ test 'release lookup, barcode is empty string' => sub {
language => "eng",
script => "Latn",
},
+ "cover-art-archive" => {
+ artwork => JSON::false,
+ count => 0,
+ front => JSON::false,
+ back => JSON::false,
+ darkened => JSON::false,
+ },
date => "1999-09-13",
country => "GB",
barcode => "",
commit 57b24733ad8c09acd787d790d578d13f6c194088
Merge: 87782c1 d45b07d
Author: Ian McEwen <[email protected]>
Date: Thu Jan 3 11:41:43 2013 -0700
Merge branch 'master' into mbs-4536-release-webservice-caa
commit f15d9d7855a1c72e773d868b59af5bc6ff9afaa6
Author: Ian McEwen <[email protected]>
Date: Thu Jan 3 11:27:56 2013 -0700
i18n: Write fixup script for migrating contexts changed in this branch
diff --git a/po/fixup/20130103-contexts.pl b/po/fixup/20130103-contexts.pl
new file mode 100644
index 0000000..7d97148
--- /dev/null
+++ b/po/fixup/20130103-contexts.pl
@@ -0,0 +1,28 @@
+#!/usr/bin/perl -w
+
+use strict;
+use warnings;
+
+use Locale::PO;
+use Clone qw( clone );
+use File::Slurp qw( read_dir );
+
+for my $file (map { './' . $_ } grep { /^mb_server\..*\.po$/ } read_dir('.')) {
+ my $aref = Locale::PO->load_file_asarray($file);
+
+ my @strings = ("Attach CD TOC", "Guess case", "Add Artist", "Add Label", "Add Release Group", "Add Release", "Add Standalone Recording", "Add Work", "Add ISRC", "Add Cover Art", "Reorder Cover Art");
+
+ my @new;
+ for my $po (@$aref) {
+ if (grep { '"' . $_ . '"' eq $po->msgid } @strings) {
+ my $clone = clone($po);
+ $clone->msgctxt('header');
+ $po->msgctxt('button/menu');
+ push @new, $clone;
+ }
+ }
+
+ push @$aref, @new;
+
+ Locale::PO->save_file_fromarray($file,$aref);
+}
commit e622f0cb411e4b0f26cda2232785e81926a70612
Merge: 8a12039 d45b07d
Author: Ian McEwen <[email protected]>
Date: Thu Jan 3 10:30:35 2013 -0700
Merge branch 'master' into i18n-fixes-2012-10-07
Conflicts:
root/work/add_iswc.tt
root/work/layout.tt
commit 87782c1bb74e2191d2246b690b57eb7116a78f23
Author: Ian McEwen <[email protected]>
Date: Sat Dec 1 21:50:29 2012 -0700
MBS-4536: fix existing XML ReleaseLookup tests to work with new cover-art-archive element
diff --git a/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupRelease.pm b/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupRelease.pm
index 9d44cff..9679cea 100644
--- a/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupRelease.pm
+++ b/t/lib/t/MusicBrainz/Server/Controller/WS/2/LookupRelease.pm
@@ -40,6 +40,12 @@ ws_test 'basic release lookup',
</text-representation>
<date>2001-07-04</date><country>JP</country><barcode>4942463511227</barcode>
<asin>B00005LA6G</asin>
+ <cover-art-archive>
+ <artwork>false</artwork>
+ <count>0</count>
+ <front>false</front>
+ <back>false</back>
+ </cover-art-archive>
</release>
</metadata>';
@@ -58,6 +64,12 @@ ws_test 'release lookup, inc=annotation',
<country>GB</country>
<barcode>600116817020</barcode>
<asin>B000KJTG6K</asin>
+ <cover-art-archive>
+ <artwork>false</artwork>
+ <count>0</count>
+ <front>false</front>
+ <back>false</back>
+ </cover-art-archive>
</release>
</metadata>';
@@ -76,6 +88,12 @@ ws_test 'basic release with tags',
<tag-list>
<tag count="1"><name>hello project</name></tag>
</tag-list>
+ <cover-art-archive>
+ <artwork>false</artwork>
+ <count>0</count>
+ <front>false</front>
+ <back>false</back>
+ </cover-art-archive>
</release>
</metadata>';
@@ -98,6 +116,12 @@ ws_test 'basic release with collections',
<release-list count="1"/>
</collection>
</collection-list>
+ <cover-art-archive>
+ <artwork>false</artwork>
+ <count>0</count>
+ <front>false</front>
+ <back>false</back>
+ </cover-art-archive>
</release>
</metadata>';
@@ -128,6 +152,12 @@ ws_test 'release lookup with artists + aliases',
</artist-credit>
<date>2004-03-17</date><country>JP</country><barcode>4988064451180</barcode>
<asin>B0001FAD2O</asin>
+ <cover-art-archive>
+ <artwork>false</artwork>
+ <count>0</count>
+ <front>false</front>
+ <back>false</back>
+ </cover-art-archive>
</release>
</metadata>';
@@ -188,6 +218,12 @@ ws_test 'release lookup with labels, recordings and tags',
</track-list>
</medium>
</medium-list>
+ <cover-art-archive>
+ <artwork>false</artwork>
+ <count>0</count>
+ <front>false</front>
+ <back>false</back>
+ </cover-art-archive>
</release>
</metadata>';
@@ -224,6 +260,12 @@ ws_test 'release lookup with release-groups',
</release-group>
<date>2004-03-17</date><country>JP</country><barcode>4988064451180</barcode>
<asin>B0001FAD2O</asin>
+ <cover-art-archive>
+ <artwork>false</artwork>
+ <count>0</count>
+ <front>false</front>
+ <back>false</back>
+ </cover-art-archive>
</release>
</metadata>';
@@ -278,6 +320,12 @@ ws_test 'release lookup with discids and puids',
</track-list>
</medium>
</medium-list>
+ <cover-art-archive>
+ <artwork>false</artwork>
+ <count>0</count>
+ <front>false</front>
+ <back>false</back>
+ </cover-art-archive>
</release>
</metadata>';
@@ -293,6 +341,12 @@ ws_test 'release lookup, barcode is NULL',
</text-representation>
<date>1999-09-23</date><country>US</country>
<asin>B00001IVAI</asin>
+ <cover-art-archive>
+ <artwork>false</artwork>
+ <count>0</count>
+ <front>false</front>
+ <back>false</back>
+ </cover-art-archive>
</release>
</metadata>';
@@ -308,6 +362,12 @@ ws_test 'release lookup, barcode is empty string',
</text-representation>
<date>1999-09-13</date><country>GB</country>
<barcode />
+ <cover-art-archive>
+ <artwork>false</artwork>
+ <count>0</count>
+ <front>false</front>
+ <back>false</back>
+ </cover-art-archive>
</release>
</metadata>';
commit 74d5095b28a6bef688218a8bf97bd249f36f1d25
Author: Pavan Chander <[email protected]>
Date: Sat Dec 1 23:32:22 2012 -0500
MBS-5022: Use hidden input when performing default
When there are no possible artists/labels, the only option is to create a new artist/label.
diff --git a/root/release/edit/missing_entities.tt b/root/release/edit/missing_entities.tt
index d0baaa1..58fd7e6 100644
--- a/root/release/edit/missing_entities.tt
+++ b/root/release/edit/missing_entities.tt
@@ -81,10 +81,15 @@
[% END %]
<p>[% l('If none of these artists match the artist you intended, you can still
- create a new artist.') %]</p>
+ create a new artist:') %]</p>
[% ELSE %]
- <p>[% l("We couldn't find an artist with the name you entered. If you wish to
- create a new artist, please fill in the fields below:") %]</p>
+ <p>[% l("We couldn't find an artist with the name you entered.
+ Please fill in the fields below to create a new artist:") %]</p>
+
+ <input type="hidden" name="[% artist_row.field('entity_id').html_name %]"
+ id="id-[% artist_row.field('entity_id').html_name %]"
+ checked="checked"
+ value="0" />
[% END %]
[% new_entity_form(artist_row) %]
</fieldset>
@@ -139,10 +144,15 @@
[% END %]
<p>[% l('If none of these labels match the label you intended, you can still
- create a new label.') %]</p>
+ create a new label:') %]</p>
[% ELSE %]
- <p>[% l("We couldn't find a label with the name you entered. If you wish to
- create a new label, please fill in the fields below:") %]</p>
+ <p>[% l("We couldn't find a label with the name you entered.
+ Please fill in the fields below to create a new label:") %]</p>
+
+ <input type="hidden" name="[% label_row.field('entity_id').html_name %]"
+ id="id-[% label_row.field('entity_id').html_name %]"
+ checked="checked"
+ value="0" />
[% END %]
[% new_entity_form(label_row) %]
</fieldset>
commit aa9e0b923c6bc932b350f5eba946f86a7faaed3b
Author: Pavan Chander <[email protected]>
Date: Sat Dec 1 21:40:07 2012 -0500
Whitespace commit
diff --git a/root/release/edit/missing_entities.tt b/root/release/edit/missing_entities.tt
index 1b5305d..d0baaa1 100644
--- a/root/release/edit/missing_entities.tt
+++ b/root/release/edit/missing_entities.tt
@@ -41,50 +41,50 @@
<legend>[% artist_row.field('name').value | html %]</legend>
[% r.hidden(artist_row.field('name')) %]
[% IF possible %]
- <p>[% ln('We found the following artist named "{artist}" in MusicBrainz.
- If this was the artist you intended to use, please select them:',
- 'We found the following artists named "{artist}" in MusicBrainz.
- If one of them was the artist you intended to use, please select them:',
- possible.size,
- { artist => html_escape(artist_row.field('name').value) }) %]</p>
+ <p>[% ln('We found the following artist named "{artist}" in MusicBrainz.
+ If this was the artist you intended to use, please select them:',
+ 'We found the following artists named "{artist}" in MusicBrainz.
+ If one of them was the artist you intended to use, please select them:',
+ possible.size,
+ { artist => html_escape(artist_row.field('name').value) }) %]</p>
- [% WRAPPER form_row %]
- <label>[% l('Artist:') %]</label>
- <ul class="inline">
- [% FOR artist=possible %]
- <li>
- <input type="radio" name="[% artist_row.field('entity_id').html_name %]"
- value="[% artist.id %]"
- [%- IF artist_row.field('entity_id').value == artist.id -%]
- checked="checked"
- [%- END -%]
- />
- [% link_entity(artist) %]
- </li>
+ [% WRAPPER form_row %]
+ <label>[% l('Artist:') %]</label>
+ <ul class="inline">
+ [% FOR artist=possible %]
+ <li>
+ <input type="radio" name="[% artist_row.field('entity_id').html_name %]"
+ value="[% artist.id %]"
+ [%- IF artist_row.field('entity_id').value == artist.id -%]
+ checked="checked"
+ [%- END -%]
+ />
+ [% link_entity(artist) %]
+ </li>
+ [% END %]
+ <li>
+ <input type="radio" name="[% artist_row.field('entity_id').html_name %]"
+ id="id-[% artist_row.field('entity_id').html_name %]"
+ [%- IF artist_row.field('entity_id').value == 0 -%]
+ checked="checked"
+ [%- END -%]
+ value="0" />
+ <label class="inline" for="id-[% artist_row.field('entity_id').html_name %]">[% l('Add new artist') %]</label>
+ </li>
+ </ul>
[% END %]
- <li>
- <input type="radio" name="[% artist_row.field('entity_id').html_name %]"
- id="id-[% artist_row.field('entity_id').html_name %]"
- [%- IF artist_row.field('entity_id').value == 0 -%]
- checked="checked"
- [%- END -%]
- value="0" />
- <label class="inline" for="id-[% artist_row.field('entity_id').html_name %]">[% l('Add new artist') %]</label>
- </li>
- </ul>
- [% END %]
- [% IF artist_row.field('entity_id').has_errors %]
- <ul class="errors">
- <li>[% l('Please make a selection') %]</li>
- </ul>
- [% END %]
+ [% IF artist_row.field('entity_id').has_errors %]
+ <ul class="errors">
+ <li>[% l('Please make a selection') %]</li>
+ </ul>
+ [% END %]
- <p>[% l('If none of these artists match the artist you intended, you can still
- create a new artist.') %]</p>
+ <p>[% l('If none of these artists match the artist you intended, you can still
+ create a new artist.') %]</p>
[% ELSE %]
- <p>[% l("We couldn't find an artist with the name you entered. If you wish to
- create a new artist, please fill in the fields below:") %]</p>
+ <p>[% l("We couldn't find an artist with the name you entered. If you wish to
+ create a new artist, please fill in the fields below:") %]</p>
[% END %]
[% new_entity_form(artist_row) %]
</fieldset>
@@ -99,50 +99,50 @@
<legend>[% label_row.field('name').value | html %]</legend>
[% r.hidden(label_row.field('name')) %]
[% IF possible %]
- <p>[% ln('We found the following label named "{label}" in MusicBrainz.
- If this was the label you intended to use, please select them:',
- 'We found the following labels named "{label}" in MusicBrainz.
- If one of them was the label you intended to use, please select them:',
- possible.size,
- { label => html_escape(label_row.field('name').value) }) %]</p>
+ <p>[% ln('We found the following label named "{label}" in MusicBrainz.
+ If this was the label you intended to use, please select them:',
+ 'We found the following labels named "{label}" in MusicBrainz.
+ If one of them was the label you intended to use, please select them:',
+ possible.size,
+ { label => html_escape(label_row.field('name').value) }) %]</p>
- [% WRAPPER form_row %]
- <label>[% l('Label:') %]</label>
- <ul class="inline">
- [% FOR label=possible %]
- <li>
- <input type="radio" name="[% label_row.field('entity_id').html_name %]"
- value="[% label.id %]"
- [%- IF label_row.field('entity_id').value == label.id -%]
- checked="checked"
- [%- END -%]
- />
- [% link_entity(label) %]
- </li>
- [% END %]
- <li>
- <input type="radio" name="[% label_row.field('entity_id').html_name %]"
- id="id-[% label_row.field('entity_id').html_name %]"
- [%- IF label_row.field('entity_id').value == 0 -%]
- checked="checked"
- [%- END -%]
- value="0" />
- <label class="inline" for="id-[% label_row.field('entity_id').html_name %]">[% l('Add new label') %]</label>
- </li>
- </ul>
- [% END %]
+ [% WRAPPER form_row %]
+ <label>[% l('Label:') %]</label>
+ <ul class="inline">
+ [% FOR label=possible %]
+ <li>
+ <input type="radio" name="[% label_row.field('entity_id').html_name %]"
+ value="[% label.id %]"
+ [%- IF label_row.field('entity_id').value == label.id -%]
+ checked="checked"
+ [%- END -%]
+ />
+ [% link_entity(label) %]
+ </li>
+ [% END %]
+ <li>
+ <input type="radio" name="[% label_row.field('entity_id').html_name %]"
+ id="id-[% label_row.field('entity_id').html_name %]"
+ [%- IF label_row.field('entity_id').value == 0 -%]
+ checked="checked"
+ [%- END -%]
+ value="0" />
+ <label class="inline" for="id-[% label_row.field('entity_id').html_name %]">[% l('Add new label') %]</label>
+ </li>
+ </ul>
+ [% END %]
- [% IF label_row.field('entity_id').has_errors %]
- <ul class="errors">
- <li>[% l('Please make a selection') %]</li>
- </ul>
- [% END %]
+ [% IF label_row.field('entity_id').has_errors %]
+ <ul class="errors">
+ <li>[% l('Please make a selection') %]</li>
+ </ul>
+ [% END %]
- <p>[% l('If none of these labels match the label you intended, you can still
- create a new label.') %]</p>
+ <p>[% l('If none of these labels match the label you intended, you can still
+ create a new label.') %]</p>
[% ELSE %]
- <p>[% l("We couldn't find a label with the name you entered. If you wish to
- create a new label, please fill in the fields below:") %]</p>
+ <p>[% l("We couldn't find a label with the name you entered. If you wish to
+ create a new label, please fill in the fields below:") %]</p>
[% END %]
[% new_entity_form(label_row) %]
</fieldset>
commit 7d8fba4a49e610d1b921091f9385122cdb2c8187
Author: Pavan Chander <[email protected]>
Date: Sat Dec 1 21:33:03 2012 -0500
MBS-5022: Use proper plural texts
diff --git a/root/release/edit/missing_entities.tt b/root/release/edit/missing_entities.tt
index 685faba..1b5305d 100644
--- a/root/release/edit/missing_entities.tt
+++ b/root/release/edit/missing_entities.tt
@@ -40,10 +40,13 @@
<fieldset>
<legend>[% artist_row.field('name').value | html %]</legend>
[% r.hidden(artist_row.field('name')) %]
- [% IF possible.size %]
- <p>[% l('We found the following artists with the same name already existing in
- MusicBrainz. If any of these are the artist you intended to use, please
- select the artist:') %]</p>
+ [% IF possible %]
+ <p>[% ln('We found the following artist named "{artist}" in MusicBrainz.
+ If this was the artist you intended to use, please select them:',
+ 'We found the following artists named "{artist}" in MusicBrainz.
+ If one of them was the artist you intended to use, please select them:',
+ possible.size,
+ { artist => html_escape(artist_row.field('name').value) }) %]</p>
[% WRAPPER form_row %]
<label>[% l('Artist:') %]</label>
@@ -95,10 +98,13 @@
<fieldset>
<legend>[% label_row.field('name').value | html %]</legend>
[% r.hidden(label_row.field('name')) %]
- [% IF possible.size %]
- <p>[% l('We found the following labels with the same name already existing in
- MusicBrainz. If any of these are the label you intended to use, please
- select the label:') %]</p>
+ [% IF possible %]
+ <p>[% ln('We found the following label named "{label}" in MusicBrainz.
+ If this was the label you intended to use, please select them:',
+ 'We found the following labels named "{label}" in MusicBrainz.
+ If one of them was the label you intended to use, please select them:',
+ possible.size,
+ { label => html_escape(label_row.field('name').value) }) %]</p>
[% WRAPPER form_row %]
<label>[% l('Label:') %]</label>
commit 69336dfff4cf6c55e77d71da69f3b41f6fb6fce4
Author: Ian McEwen <[email protected]>
Date: Tue Nov 27 15:35:36 2012 -0700
MBS-4536: Only test truthiness, not > 0
diff --git a/lib/MusicBrainz/Server/WebService/Serializer/JSON/2/Release.pm b/lib/MusicBrainz/Server/WebService/Serializer/JSON/2/Release.pm
index bb10463..98bc9c3 100644
--- a/lib/MusicBrainz/Server/WebService/Serializer/JSON/2/Release.pm
+++ b/lib/MusicBrainz/Server/WebService/Serializer/JSON/2/Release.pm
@@ -47,8 +47,8 @@ sub serialize
artwork => boolean($entity->cover_art_presence eq 'present'),
darkened => boolean($entity->cover_art_presence eq 'darkened'),
count => $coverart->{total},
- front => boolean($coverart->{front} > 0),
- back => boolean($coverart->{back} > 0)
+ front => boolean($coverart->{front}),
+ back => boolean($coverart->{back})
};
$body{"text-representation"} = {
diff --git a/lib/MusicBrainz/Server/WebService/XMLSerializer.pm b/lib/MusicBrainz/Server/WebService/XMLSerializer.pm
index 672b629..3a5bbb7 100644
--- a/lib/MusicBrainz/Server/WebService/XMLSerializer.pm
+++ b/lib/MusicBrainz/Server/WebService/XMLSerializer.pm
@@ -392,8 +392,8 @@ sub _serialize_cover_art_archive
my @list;
push @list, $gen->artwork($release->cover_art_presence eq 'present' ? 'true' : 'false');
push @list, $gen->count($coverart->{total});
- push @list, $gen->front($coverart->{front} > 0 ? 'true' : 'false');
- push @list, $gen->back($coverart->{back} > 0 ? 'true' : 'false');
+ push @list, $gen->front($coverart->{front} ? 'true' : 'false');
+ push @list, $gen->back($coverart->{back} ? 'true' : 'false');
push @list, $gen->darkened('true') if $release->cover_art_presence eq 'darkened';
push @$data, $gen->cover_art_archive(@list);
commit 0b2545647fd828b8b481b33d98796d969f583c09
Merge: 55ba161 996b98e
Author: Ian McEwen <[email protected]>
Date: Tue Nov 27 15:32:34 2012 -0700
Merge branch 'master' into mbs-4536-release-webservice-caa
diff --cc lib/MusicBrainz/Server/Controller/WS/2/Release.pm
index e12c1d2,32206d0..74441b1
--- a/lib/MusicBrainz/Server/Controller/WS/2/Release.pm
+++ b/lib/MusicBrainz/Server/Controller/WS/2/Release.pm
@@@ -59,14 -59,11 +59,17 @@@ sub release_topleve
$c->model('Release')->load_meta($release);
$self->linked_releases ($c, $stash, [ $release ]);
+ if ($release->cover_art_presence eq 'present') {
+ $stash->store($release)->{'cover-art-archive'} = $c->model('CoverArtArchive')->get_stats_for_release($release->id);
+ } else {
+ $stash->store($release)->{'cover-art-archive'} = {total => 0, front => 0, back => 0};
+ }
+
my @rels_entities = $release;
+ $c->model('Release')->annotation->load_latest($release)
+ if $c->stash->{inc}->annotation;
+
if ($c->stash->{inc}->artists)
{
$c->model('ArtistCredit')->load($release);
diff --cc lib/MusicBrainz/Server/WebService/Serializer/JSON/2/Release.pm
index aa45e1e,c86fe33..bb10463
--- a/lib/MusicBrainz/Server/WebService/Serializer/JSON/2/Release.pm
+++ b/lib/MusicBrainz/Server/WebService/Serializer/JSON/2/Release.pm
@@@ -1,9 -1,10 +1,10 @@@
package MusicBrainz::Server::WebService::Serializer::JSON::2::Release;
use Moose;
use MusicBrainz::Server::Constants qw( :quality );
-use MusicBrainz::Server::WebService::Serializer::JSON::2::Utils qw( list_of serialize_entity );
+use MusicBrainz::Server::WebService::Serializer::JSON::2::Utils qw( list_of serialize_entity boolean );
extends 'MusicBrainz::Server::WebService::Serializer::JSON::2';
+ with 'MusicBrainz::Server::WebService::Serializer::JSON::2::Role::Annotation';
with 'MusicBrainz::Server::WebService::Serializer::JSON::2::Role::GID';
with 'MusicBrainz::Server::WebService::Serializer::JSON::2::Role::Rating';
with 'MusicBrainz::Server::WebService::Serializer::JSON::2::Role::Relationships';
commit 55ba161a7b8548296dfa05876bb0285e7d8eb301
Author: Ian McEwen <[email protected]>
Date: Mon Nov 5 01:31:57 2012 -0700
MBS-4536: don't use strings for booleans in JSON
diff --git a/lib/MusicBrainz/Server/WebService/Serializer/JSON/2/Release.pm b/lib/MusicBrainz/Server/WebService/Serializer/JSON/2/Release.pm
index 04e0f0c..aa45e1e 100644
--- a/lib/MusicBrainz/Server/WebService/Serializer/JSON/2/Release.pm
+++ b/lib/MusicBrainz/Server/WebService/Serializer/JSON/2/Release.pm
@@ -1,7 +1,7 @@
package MusicBrainz::Server::WebService::Serializer::JSON::2::Release;
use Moose;
use MusicBrainz::Server::Constants qw( :quality );
-use MusicBrainz::Server::WebService::Serializer::JSON::2::Utils qw( list_of serialize_entity );
+use MusicBrainz::Server::WebService::Serializer::JSON::2::Utils qw( list_of serialize_entity boolean );
extends 'MusicBrainz::Server::WebService::Serializer::JSON::2';
with 'MusicBrainz::Server::WebService::Serializer::JSON::2::Role::GID';
@@ -43,11 +43,11 @@ sub serialize
my $coverart = $stash->store($entity)->{'cover-art-archive'};
$body{'cover-art-archive'} = {
- artwork => $entity->cover_art_presence eq 'present' ? 'true' : 'false',
- darkened => $entity->cover_art_presence eq 'darkened' ? 'true' : 'false',
+ artwork => boolean($entity->cover_art_presence eq 'present'),
+ darkened => boolean($entity->cover_art_presence eq 'darkened'),
count => $coverart->{total},
- front => $coverart->{front} > 0 ? 'true' : 'false',
- back => $coverart->{back} > 0 ? 'true' : 'false'
+ front => boolean($coverart->{front} > 0),
+ back => boolean($coverart->{back} > 0)
};
$body{"text-representation"} = {
commit 03046806a77180092f4cada41e60e6af0ce1ded7
Author: Ian McEwen <[email protected]>
Date: Fri Nov 2 15:14:14 2012 -0700
MBS-4536: JSON Serialization for CAA data in release webservice
diff --git a/lib/MusicBrainz/Server/WebService/Serializer/JSON/2/Release.pm b/lib/MusicBrainz/Server/WebService/Serializer/JSON/2/Release.pm
index 23ca9c3..04e0f0c 100644
--- a/lib/MusicBrainz/Server/WebService/Serializer/JSON/2/Release.pm
+++ b/lib/MusicBrainz/Server/WebService/Serializer/JSON/2/Release.pm
@@ -41,6 +41,15 @@ sub serialize
$body{packaging} = $entity->packaging
? $entity->packaging->name : JSON::null;
+ my $coverart = $stash->store($entity)->{'cover-art-archive'};
+ $body{'cover-art-archive'} = {
+ artwork => $entity->cover_art_presence eq 'present' ? 'true' : 'false',
+ darkened => $entity->cover_art_presence eq 'darkened' ? 'true' : 'false',
+ count => $coverart->{total},
+ front => $coverart->{front} > 0 ? 'true' : 'false',
+ back => $coverart->{back} > 0 ? 'true' : 'false'
+ };
+
$body{"text-representation"} = {
script => $entity->script ? $entity->script->iso_code : JSON::null,
language => $entity->language ? $entity->language->iso_code_3 : JSON::null
commit 7839a0eb19e4a98175c76a88774afab197731e21
Author: Ian McEwen <[email protected]>
Date: Fri Nov 2 15:10:52 2012 -0700
MBS-4536: Add (usually not present) <darkened> element to XML output
diff --git a/lib/MusicBrainz/Server/WebService/XMLSerializer.pm b/lib/MusicBrainz/Server/WebService/XMLSerializer.pm
index 60e7ad3..393e4cf 100644
--- a/lib/MusicBrainz/Server/WebService/XMLSerializer.pm
+++ b/lib/MusicBrainz/Server/WebService/XMLSerializer.pm
@@ -379,6 +379,7 @@ sub _serialize_cover_art_archive
push @list, $gen->count($coverart->{total});
push @list, $gen->front($coverart->{front} > 0 ? 'true' : 'false');
push @list, $gen->back($coverart->{back} > 0 ? 'true' : 'false');
+ push @list, $gen->darkened('true') if $release->cover_art_presence eq 'darkened';
push @$data, $gen->cover_art_archive(@list);
}
commit d504762eafb9d3f47691dd85af6c64a062fd6670
Author: Ian McEwen <[email protected]>
Date: Fri Nov 2 15:06:17 2012 -0700
MBS-4536: switch to bool_or rather than count, for correctness
diff --git a/lib/MusicBrainz/Server/Data/CoverArtArchive.pm b/lib/MusicBrainz/Server/Data/CoverArtArchive.pm
index 42359c6..0c6bfab 100644
--- a/lib/MusicBrainz/Server/Data/CoverArtArchive.pm
+++ b/lib/MusicBrainz/Server/Data/CoverArtArchive.pm
@@ -43,8 +43,8 @@ sub get_stats_for_release {
my ($self, $release_id) = @_;
my $stats = $self->sql->select_list_of_hashes(
'SELECT COUNT(*) total,
- COUNT(CASE WHEN is_front = true THEN 1 ELSE NULL END) front,
- COUNT(CASE WHEN is_back = true THEN 1 ELSE NULL END) back
+ bool_or(is_front) front,
+ bool_or(is_back) back
FROM cover_art_archive.index_listing
WHERE release = ?',
$release_id);
commit 5e1c19c76445fb769621b9192965b81b9fbb93cd
Author: Ian McEwen <[email protected]>
Date: Mon Oct 29 20:02:24 2012 -0700
MBS-4536: add more stats to the CAA webservice stuff
diff --git a/lib/MusicBrainz/Server/Controller/WS/2/Release.pm b/lib/MusicBrainz/Server/Controller/WS/2/Release.pm
index fe88723..e12c1d2 100644
--- a/lib/MusicBrainz/Server/Controller/WS/2/Release.pm
+++ b/lib/MusicBrainz/Server/Controller/WS/2/Release.pm
@@ -59,6 +59,12 @@ sub release_toplevel
$c->model('Release')->load_meta($release);
$self->linked_releases ($c, $stash, [ $release ]);
+ if ($release->cover_art_presence eq 'present') {
+ $stash->store($release)->{'cover-art-archive'} = $c->model('CoverArtArchive')->get_stats_for_release($release->id);
+ } else {
+ $stash->store($release)->{'cover-art-archive'} = {total => 0, front => 0, back => 0};
+ }
+
my @rels_entities = $release;
if ($c->stash->{inc}->artists)
diff --git a/lib/MusicBrainz/Server/Data/CoverArtArchive.pm b/lib/MusicBrainz/Server/Data/CoverArtArchive.pm
index 6bac9ed..42359c6 100644
--- a/lib/MusicBrainz/Server/Data/CoverArtArchive.pm
+++ b/lib/MusicBrainz/Server/Data/CoverArtArchive.pm
@@ -39,6 +39,18 @@ sub find_available_artwork {
];
};
+sub get_stats_for_release {
+ my ($self, $release_id) = @_;
+ my $stats = $self->sql->select_list_of_hashes(
+ 'SELECT COUNT(*) total,
+ COUNT(CASE WHEN is_front = true THEN 1 ELSE NULL END) front,
+ COUNT(CASE WHEN is_back = true THEN 1 ELSE NULL END) back
+ FROM cover_art_archive.index_listing
+ WHERE release = ?',
+ $release_id);
+ return $stats->[0];
+}
+
sub fresh_id {
return int((time() - 1327528905) * 100);
}
diff --git a/lib/MusicBrainz/Server/WebService/XMLSerializer.pm b/lib/MusicBrainz/Server/WebService/XMLSerializer.pm
index c7382c9..60e7ad3 100644
--- a/lib/MusicBrainz/Server/WebService/XMLSerializer.pm
+++ b/lib/MusicBrainz/Server/WebService/XMLSerializer.pm
@@ -349,7 +349,7 @@ sub _serialize_release
push @list, $gen->country($release->country->iso_code) if $release->country;
push @list, $gen->barcode($release->barcode->code) if defined $release->barcode->code;
push @list, $gen->asin($release->amazon_asin) if $release->amazon_asin;
- push @list, $gen->cover_art_archive($gen->artwork($release->cover_art_presence eq 'present' ? 'true' : 'false')) if $release->cover_art_presence;
+ $self->_serialize_cover_art_archive(\@list, $gen, $release, $inc, $stash) if $release->cover_art_presence;
if ($toplevel)
{
@@ -369,6 +369,20 @@ sub _serialize_release
push @$data, $gen->release({ id => $release->gid }, @list);
}
+sub _serialize_cover_art_archive
+{
+ my ($self, $data, $gen, $release, $inc, $stash) = @_;
+ my $coverart = $stash->store($release)->{'cover-art-archive'};
+
+ my @list;
+ push @list, $gen->artwork($release->cover_art_presence eq 'present' ? 'true' : 'false');
+ push @list, $gen->count($coverart->{total});
+ push @list, $gen->front($coverart->{front} > 0 ? 'true' : 'false');
+ push @list, $gen->back($coverart->{back} > 0 ? 'true' : 'false');
+
+ push @$data, $gen->cover_art_archive(@list);
+}
+
sub _serialize_work_list
{
my ($self, $data, $gen, $list, $inc, $stash, $toplevel) = @_;
commit 1d062f5859a24a41cc21877848edd64e853729a8
Author: Ian McEwen <[email protected]>
Date: Mon Oct 29 18:14:55 2012 -0700
MBS-4536: change to using <cover-art-archive><artwork> instead of simply <caa>
diff --git a/lib/MusicBrainz/Server/WebService/XMLSerializer.pm b/lib/MusicBrainz/Server/WebService/XMLSerializer.pm
index d440783..c7382c9 100644
--- a/lib/MusicBrainz/Server/WebService/XMLSerializer.pm
+++ b/lib/MusicBrainz/Server/WebService/XMLSerializer.pm
@@ -349,7 +349,7 @@ sub _serialize_release
push @list, $gen->country($release->country->iso_code) if $release->country;
push @list, $gen->barcode($release->barcode->code) if defined $release->barcode->code;
push @list, $gen->asin($release->amazon_asin) if $release->amazon_asin;
- push @list, $gen->caa($release->cover_art_presence) if $release->cover_art_presence;
+ push @list, $gen->cover_art_archive($gen->artwork($release->cover_art_presence eq 'present' ? 'true' : 'false')) if $release->cover_art_presence;
if ($toplevel)
{
commit 1d94f11c2d445ade701664945cc84d2065cce2d5
Author: Ian McEwen <[email protected]>
Date: Sat Oct 20 02:13:19 2012 -0700
MBS-4536: display cover_art_presence value in the webservice
diff --git a/lib/MusicBrainz/Server/WebService/XMLSerializer.pm b/lib/MusicBrainz/Server/WebService/XMLSerializer.pm
index 525fffa..d440783 100644
--- a/lib/MusicBrainz/Server/WebService/XMLSerializer.pm
+++ b/lib/MusicBrainz/Server/WebService/XMLSerializer.pm
@@ -349,6 +349,7 @@ sub _serialize_release
push @list, $gen->country($release->country->iso_code) if $release->country;
push @list, $gen->barcode($release->barcode->code) if defined $release->barcode->code;
push @list, $gen->asin($release->amazon_asin) if $release->amazon_asin;
+ push @list, $gen->caa($release->cover_art_presence) if $release->cover_art_presence;
if ($toplevel)
{
commit 8a120396cc4ecd6d5f605d7e98ed815e8541e90f
Author: Ian McEwen <[email protected]>
Date: Thu Oct 18 02:00:15 2012 -0700
i18n: pass 'View all ratings' through l()
diff --git a/root/user/ratings_summary.tt b/root/user/ratings_summary.tt
index 845f6dc..c1d5f34 100644
--- a/root/user/ratings_summary.tt
+++ b/root/user/ratings_summary.tt
@@ -22,7 +22,7 @@
[ user.name ], type.1
)
%]
- <a href="[% view_more %]">View all ratings</a>
+ <a href="[% view_more %]">[% l('View all ratings') %]</a>
</li>
</ul>
[% END %]
commit 6dfe1e4c67ed0833918d012343ca7a2a926836b1
Author: Ian McEwen <[email protected]>
Date: Wed Oct 10 01:55:34 2012 -0700
i18n: switch to using two l() calls rather than an ln() to circumvent a gettext weirdness
diff --git a/root/edit/details/add_cover_art.tt b/root/edit/details/add_cover_art.tt
index 6811195..5b49971 100644
--- a/root/edit/details/add_cover_art.tt
+++ b/root/edit/details/add_cover_art.tt
@@ -15,7 +15,8 @@
[% IF edit.display_data.types.size %]
<tr>
- <th>[% ln('Type:', 'Types:', edit.display_data.types.size) %]</th>
+ [%# Since the number isn't actually included in the string, we use multiple l() here rather than ln() %]
+ <th>[% IF edit.display_data.types.size == 1; l('Type:'); ELSE; l('Types:'); END %]</th>
<td>
[% USE Map %]
[% comma_only_list(edit.display_data.types.map('l_name')) | html %]
diff --git a/root/edit/details/edit_cover_art.tt b/root/edit/details/edit_cover_art.tt
index 8c939d6..f2a4de9 100644
--- a/root/edit/details/edit_cover_art.tt
+++ b/root/edit/details/edit_cover_art.tt
@@ -7,7 +7,9 @@
</tr>
[%- plural = max(edit.display_data.types.old.size, edit.display_data.types.new.size) -%]
- [% display_diff(ln('Type:', 'Types:', plural),
+ [%# Since the number isn't actually included in the string, we use multiple l() here rather than ln() %]
+ [%- IF plural == 1; type_string = l('Type:'); ELSE; type_string = l('Types:'); END -%]
+ [% display_diff(type_string,
html_escape(edit.display_data.types.old),
html_escape(edit.display_data.types.new), ", ") %]
diff --git a/root/edit/details/remove_cover_art.tt b/root/edit/details/remove_cover_art.tt
index 916d538..d568307 100644
--- a/root/edit/details/remove_cover_art.tt
+++ b/root/edit/details/remove_cover_art.tt
@@ -7,7 +7,8 @@
</tr>
<tr>
- <th>[% ln('Type:', 'Types:', edit.display_data.types.size) %]</th>
+ [%# Since the number isn't actually included in the string, we use multiple l() here rather than ln() %]
+ <th>[% IF edit.display_data.types.size == 1; l('Type:'); ELSE; l('Types:'); END %]</th>
<td>
[% IF edit.display_data.types.size %]
[% USE Map %]
diff --git a/root/release/cover_art.tt b/root/release/cover_art.tt
index 090a16a..6a46c12 100644
--- a/root/release/cover_art.tt
+++ b/root/release/cover_art.tt
@@ -10,7 +10,9 @@
[%- display_artwork (artwork, undef, undef, 'mb-caa') -%]
</div>
<p>
- [% ln('Type:', 'Types:', artwork.types.size) %] [% comma_only_list(artwork.types) || '-' %]
+ [%# Since the number isn't actually included in the string, we use multiple l() here rather than ln() %]
+ [%- IF artwork.types.size == 1; l('Type:'); ELSE; l('Types:'); END -%]
+ [% comma_only_list(artwork.types) || '-' %]
</p>
[%- IF artwork.comment -%]
<p>
commit 144994457abfd3167b07e2b17d2b010f44fb2202
Merge: b9d1930 ccb59e3
Author: Ian McEwen <[email protected]>
Date: Wed Oct 10 01:47:34 2012 -0700
Merge branch 'beta' into i18n-fixes-2012-10-07
commit b9d1930b51fb4b8c7079b80eaeb32d40fe103a99
Author: Ian McEwen <[email protected]>
Date: Tue Oct 9 03:37:54 2012 -0700
i18n: transifex stupidly merges some things, differentiating
diff --git a/root/edit/list.tt b/root/edit/list.tt
index 11b7c6c..f067b08 100644
--- a/root/edit/list.tt
+++ b/root/edit/list.tt
@@ -61,9 +61,9 @@
500, 525, 525, ...; we'll then always show 'at least', which is
not perfectly optimal but isn't inaccurate at least.
-%]
- [% IF guess_search && pager.last_page > 1 &&
+ [% IF guess_search && pager.last_page > 1 &&
pager.total_entries % pager.entries_per_page == 0 %]
- [%- ln('Found {n} edit', 'Found at least {n} edits' ,
+ [%- ln('Found at least {n} edit', 'Found at least {n} edits' ,
pager.total_entries,
{ n => add_commas(pager.total_entries) }) -%]
[% ELSE %]
commit 643f5f3350dd57aed9ec8f9d1636f664c4f65e1c
Author: Ian McEwen <[email protected]>
Date: Sun Oct 7 17:32:09 2012 -0700
i18n: contextualize the rest of the edit menu 'Add X'
diff --git a/root/layout/menu.tt b/root/layout/menu.tt
index 64e5171..00990a2 100644
--- a/root/layout/menu.tt
+++ b/root/layout/menu.tt
@@ -200,13 +200,13 @@
<a href="[% doc_link('How_Editing_Works') %]">[% l('Editing') %]</a>
<ul>
<li>
- <a href="[% c.uri_for('/artist/create') %]">[% l('Add Artist') %]</a>
+ <a href="[% c.uri_for('/artist/create') %]">[% lp('Add Artist', 'button/menu') %]</a>
</li>
<li>
- <a href="[% c.uri_for('/label/create') %]">[% l('Add Label') %]</a>
+ <a href="[% c.uri_for('/label/create') %]">[% lp('Add Label', 'button/menu') %]</a>
</li>
<li>
- <a href="[% c.uri_for_action('/release_group/create') %]">[% l('Add Release Group') %]</a>
+ <a href="[% c.uri_for_action('/release_group/create') %]">[% lp('Add Release Group', 'button/menu') %]</a>
</li>
<li>
<a href="[% c.uri_for_action('/release_editor/add') %]">[% lp('Add Release', 'button/menu') %]</a>
@@ -215,10 +215,10 @@
<a href="[% c.uri_for_action('/release_editor/add', { artist = various_artist_mbid }) %]">[% l('Add Various Artists Release') %]</a>
</li>
<li>
- <a href="[% c.uri_for_action('/recording/create') %]">[% l('Add Standalone Recording') %]</a>
+ <a href="[% c.uri_for_action('/recording/create') %]">[% lp('Add Standalone Recording', 'button/menu') %]</a>
</li>
<li>
- <a href="[% c.uri_for_action('/work/create') %]">[% l('Add Work') %]</a>
+ <a href="[% c.uri_for_action('/work/create') %]">[% lp('Add Work', 'button/menu') %]</a>
</li>
<li class="separator">
<a href="[% c.uri_for('/edit/open') %]">[% l('Vote on Edits') %]</a>
diff --git a/root/recording/create.tt b/root/recording/create.tt
index 2738957..648d6e6 100644
--- a/root/recording/create.tt
+++ b/root/recording/create.tt
@@ -13,9 +13,9 @@
//]]></script>
[%- END -%]
-[% WRAPPER 'layout.tt' title=l('Add Standalone Recording') full_width=1 %]
+[% WRAPPER 'layout.tt' title=lp('Add Standalone Recording', 'header') full_width=1 %]
<div id="content">
- <h1>[%- l('Add Standalone Recording') -%]</h1>
+ <h1>[%- lp('Add Standalone Recording', 'header') -%]</h1>
[% INCLUDE 'recording/edit_form.tt' %]
</div>
[% END %]
diff --git a/root/release/edit/information.tt b/root/release/edit/information.tt
index 5d5cf3e..97d1149 100644
--- a/root/release/edit/information.tt
+++ b/root/release/edit/information.tt
@@ -99,9 +99,9 @@
[% WRAPPER form_row %]
<div class="add-label" style="text-align: right; width: 100%; ">
- <span class="add-label" style="padding: 0 1em;">[% l('Add Label') %]</span>
+ <span class="add-label" style="padding: 0 1em;">[% lp('Add Label', 'header') %]</span>
<a class="icon add-label" href="#add_label" style="margin-right: 14px;">
- <img src="[% c.uri_for('/static/images/icons/add_row.png') %]" title="[% l('Add Label') %]" alt="[% l('Add Label') %]" />
+ <img src="[% c.uri_for('/static/images/icons/add_row.png') %]" title="[% lp('Add Label', 'button/menu') %]" alt="[% lp('Add Label', 'button/menu') %]" />
</a>
</div>
[% END %]
diff --git a/root/work/create.tt b/root/work/create.tt
index 67e0ab3..168f5b2 100644
--- a/root/work/create.tt
+++ b/root/work/create.tt
@@ -12,8 +12,8 @@
//]]></script>
[%- END -%]
-[% WRAPPER 'layout.tt' title=l('Add Work') full_width=1 %]
- <h1>[%- l('Add Work') -%]</h1>
+[% WRAPPER 'layout.tt' title=lp('Add Work', 'header') full_width=1 %]
+ <h1>[%- lp('Add Work', 'header') -%]</h1>
[%- IF no_javascript -%]
[%- warning( l("Javascript needs to be enabled to edit the Artist field on this page."), "nojavascript" ) -%]
[%- END -%]
commit ace37903afc424b22bdc6ec6f528b84d20e725e9
Author: Ian McEwen <[email protected]>
Date: Sun Oct 7 17:24:13 2012 -0700
i18n: contextualize 'Attach CD TOC'
diff --git a/root/cdtoc/attach_artist_releases.tt b/root/cdtoc/attach_artist_releases.tt
index cc66bd6..9aa4a2c 100644
--- a/root/cdtoc/attach_artist_releases.tt
+++ b/root/cdtoc/attach_artist_releases.tt
@@ -19,8 +19,8 @@ $(document).ready (function () {
</script>
[% END %]
-[% WRAPPER 'layout.tt' title=l('Attach CD TOC') full_width=1 %]
- <h1>[% l('Attach CD TOC') %]</h1>
+[% WRAPPER 'layout.tt' title=lp('Attach CD TOC', 'header') full_width=1 %]
+ <h1>[% lp('Attach CD TOC', 'header') %]</h1>
<p>[% l('You are viewing releases by {artist}.', { artist => link_entity(artist) }) %]</p>
[% IF releases.size %]
<p>[% l('Please select the medium you wish to attach this CD TOC to.') %]</p>
@@ -52,7 +52,7 @@ $(document).ready (function () {
</table>
[% END %]
<div style="margin-top: 1em;">
- [% form_submit(l('Attach CD TOC')) %]
+ [% form_submit(lp('Attach CD TOC', 'button/menu')) %]
</div>
</form>
[% ELSE %]
diff --git a/root/cdtoc/attach_confirm.tt b/root/cdtoc/attach_confirm.tt
index 64c1c11..6e2f983 100644
--- a/root/cdtoc/attach_confirm.tt
+++ b/root/cdtoc/attach_confirm.tt
@@ -1,5 +1,5 @@
-[% WRAPPER 'layout.tt' title=l('Attach CD TOC') full_width=1 %]
- <h1>[% l('Attach CD TOC') %]</h1>
+[% WRAPPER 'layout.tt' title=lp('Attach CD TOC', 'header') full_width=1 %]
+ <h1>[% lp('Attach CD TOC', 'header') %]</h1>
<p>[% l('Are you sure that you wish to attach the disc ID <code>{discid}</code> to {format} {pos} of
{release} by {artist}?', { discid => cdtoc.discid, format => medium.format_name,
pos => medium.position, release => link_entity(medium.release),
diff --git a/root/cdtoc/attach_filter_artist.tt b/root/cdtoc/attach_filter_artist.tt
index 6777f94..cb88106 100644
--- a/root/cdtoc/attach_filter_artist.tt
+++ b/root/cdtoc/attach_filter_artist.tt
@@ -1,5 +1,5 @@
-[% WRAPPER 'layout.tt' title=l('Attach CD TOC') full_width=1 %]
- <h1>[% l('Attach CD TOC') %]</h1>
+[% WRAPPER 'layout.tt' title=lp('Attach CD TOC', 'header') full_width=1 %]
+ <h1>[% lp('Attach CD TOC', 'header') %]</h1>
<h2>[% l('Search for an artist') %]</h2>
<form action="[% c.req.uri_for_action('/cdtoc/attach') %]" method="get">
[% USE r = FormRenderer(query_artist) %]
diff --git a/root/cdtoc/attach_filter_release.tt b/root/cdtoc/attach_filter_release.tt
index 72e85f0..cc51f9d 100644
--- a/root/cdtoc/attach_filter_release.tt
+++ b/root/cdtoc/attach_filter_release.tt
@@ -19,8 +19,8 @@ $(document).ready (function () {
</script>
[% END %]
-[% WRAPPER 'layout.tt' title=l('Attach CD TOC') full_width=1 %]
- <h1>[% l('Attach CD TOC') %]</h1>
+[% WRAPPER 'layout.tt' title=lp('Attach CD TOC', 'header') full_width=1 %]
+ <h1>[% lp('Attach CD TOC', 'header') %]</h1>
<form action="[% c.req.uri_for_action('/cdtoc/attach') %]" method="get">
[% USE r = FormRenderer(query_release) %]
<input type="hidden" name="toc" value="[% toc %]" />
@@ -66,7 +66,7 @@ $(document).ready (function () {
</tbody>
</table>
[% END %]
- <p>[% form_submit(l('Attach CD TOC')) %]
+ <p>[% form_submit(lp('Attach CD TOC', 'button/menu')) %]
[%- ELSE -%]
<div class="row">
<div class="label required">[% l('Results:') %]</div>
commit 83d9b1aec4128b7a7300aaa6de801724ecc4f007
Author: Ian McEwen <[email protected]>
Date: Sun Oct 7 17:20:48 2012 -0700
i18n: contextualize 'Add ISRC' and 'Add ISWC'
diff --git a/root/recording/add_isrc.tt b/root/recording/add_isrc.tt
index 97df556..563d43c 100644
--- a/root/recording/add_isrc.tt
+++ b/root/recording/add_isrc.tt
@@ -1,5 +1,5 @@
-[% WRAPPER 'recording/layout.tt' title=l('Add ISRC') %]
- <h2>[% l('Add ISRC') %]</h2>
+[% WRAPPER 'recording/layout.tt' title=lp('Add ISRC', 'header') %]
+ <h2>[% lp('Add ISRC', 'header') %]</h2>
<p>[% l('You are about to add an ISRC to {recording} by {ac}. The ISRC must be entered in
standard <code>CCXXXYYNNNNNN</code> format:',
{ recording => link_entity(recording),
diff --git a/root/recording/layout.tt b/root/recording/layout.tt
index 43515e9..8761666 100644
--- a/root/recording/layout.tt
+++ b/root/recording/layout.tt
@@ -31,7 +31,7 @@
<h2 class="editing">[% l('Editing') %]</h2>
<ul class="links">
[% IF c.user_exists %]
- <li>[% link_entity(recording, 'add_isrc', l('Add ISRC')) %]</li>
+ <li>[% link_entity(recording, 'add_isrc', lp('Add ISRC', 'button/menu')) %]</li>
[% annotation_links(recording) %]
<li>
<a href="[% c.uri_for_action('/recording/merge_queue', { 'add-to-merge' => recording.id }) %]">
diff --git a/root/work/add_iswc.tt b/root/work/add_iswc.tt
index 09a771e..adbc076 100644
--- a/root/work/add_iswc.tt
+++ b/root/work/add_iswc.tt
@@ -1,5 +1,5 @@
-[% WRAPPER 'work/layout.tt' title=l('Add ISWC') %]
- <h2>[% l('Add ISWC') %]</h2>
+[% WRAPPER 'work/layout.tt' title=lp('Add ISWC', 'header') %]
+ <h2>[% lp('Add ISWC', 'header') %]</h2>
<p>[% l('You are about to add an ISWC to {work}. The ISWC must be entered in
standard <code>T-DDD.DDD.DDD-C</code> format:',
{ work => link_entity(work) }) %]</p>
diff --git a/root/work/layout.tt b/root/work/layout.tt
index 0498f62..c21e975 100644
--- a/root/work/layout.tt
+++ b/root/work/layout.tt
@@ -34,7 +34,7 @@
<h2 class="editing">[% l('Editing') %]</h2>
<ul class="links">
[% IF c.user_exists %]
- <li>[% link_work(work, 'add_iswc', l('Add ISWC')) %]</li>
+ <li>[% link_work(work, 'add_iswc', lp('Add ISWC', 'button/menu')) %]</li>
[% annotation_links(work) %]
<li>
<a href="[% c.uri_for_action('/work/merge_queue', { 'add-to-merge' => work.id }) %]">
commit f886b369f3179236a4b58f7be85ce41dbd687f07
Author: Ian McEwen <[email protected]>
Date: Sun Oct 7 17:13:48 2012 -0700
i18n: contextualize 'Reorder Cover Art'
diff --git a/root/release/cover_art.tt b/root/release/cover_art.tt
index 83b7251..1fc8cca 100644
--- a/root/release/cover_art.tt
+++ b/root/release/cover_art.tt
@@ -48,7 +48,7 @@
<div class="buttons ui-helper-clearfix">
[%- link_release(release, 'add_cover_art', lp('Add Cover Art', 'button/menu')) -%]
[%- IF cover_art.size > 1 -%]
- [%- link_release(release, 'reorder_cover_art', l('Reorder Cover Art')) -%]
+ [%- link_release(release, 'reorder_cover_art', lp('Reorder Cover Art', 'button/menu')) -%]
[%- END -%]
</div>
[%- ELSE -%]
diff --git a/root/release/reorder_cover_art.tt b/root/release/reorder_cover_art.tt
index 6f6c5e5..0bcf08a 100644
--- a/root/release/reorder_cover_art.tt
+++ b/root/release/reorder_cover_art.tt
@@ -2,8 +2,8 @@
[%- script_manifest('edit.js.manifest') -%]
[%- END -%]
-[% WRAPPER "release/layout.tt" title=l('Reorder Cover Art') page='reorder_cover_art' %]
- <h2>[%- l('Reorder Cover Art') -%]</h2>
+[% WRAPPER "release/layout.tt" title=lp('Reorder Cover Art', 'header') page='reorder_cover_art' %]
+ <h2>[%- lp('Reorder Cover Art', 'header') -%]</h2>
<form id="reorder-cover-art" class="cover-art" action="[% c.req.uri %]" method="post">
[%- USE r = FormRenderer(form) -%]
commit 46ae32afdf4d50b1e56d156d0d01abb756aa641e
Author: Ian McEwen <[email protected]>
Date: Sun Oct 7 17:12:10 2012 -0700
i18n: change 'button' to 'button/menu', contextualize 'Add Release'
diff --git a/root/components/forms.tt b/root/components/forms.tt
index e844094..af1ec1e 100644
--- a/root/components/forms.tt
+++ b/root/components/forms.tt
@@ -164,7 +164,7 @@
<fieldset class="guesscase">
<legend>[% lp('Guess case', 'header') %]</legend>
<div style="float: right; margin: 10px;" class="buttons">
- <a href="#guesscase">[% lp('Guess case', 'button') %]</a>
+ <a href="#guesscase">[% lp('Guess case', 'button/menu') %]</a>
</div>
<p class="guesscase-options">
<select name="gc-mode" id="gc-mode"> </select>
@@ -185,7 +185,7 @@
[%- (l('Please use the Guess Case button to fix common style errors.')) -%]
</p>
<div class="buttons">
- <a href="#guesscase">[% lp('Guess case', 'button') %]</a>
+ <a href="#guesscase">[% lp('Guess case', 'button/menu') %]</a>
</div>
<div class="guesscase-options">
<table>
diff --git a/root/layout/menu.tt b/root/layout/menu.tt
index e9b0218..64e5171 100644
--- a/root/layout/menu.tt
+++ b/root/layout/menu.tt
@@ -209,7 +209,7 @@
<a href="[% c.uri_for_action('/release_group/create') %]">[% l('Add Release Group') %]</a>
</li>
<li>
- <a href="[% c.uri_for_action('/release_editor/add') %]">[% l('Add Release') %]</a>
+ <a href="[% c.uri_for_action('/release_editor/add') %]">[% lp('Add Release', 'button/menu') %]</a>
</li>
<li>
<a href="[% c.uri_for_action('/release_editor/add', { artist = various_artist_mbid }) %]">[% l('Add Various Artists Release') %]</a>
diff --git a/root/release/cover_art.tt b/root/release/cover_art.tt
index 7961c94..83b7251 100644
--- a/root/release/cover_art.tt
+++ b/root/release/cover_art.tt
@@ -46,7 +46,7 @@
[%- IF c.user_exists -%]
[%- IF release.may_have_cover_art -%]
<div class="buttons ui-helper-clearfix">
- [%- link_release(release, 'add_cover_art', lp('Add Cover Art', 'button')) -%]
+ [%- link_release(release, 'add_cover_art', lp('Add Cover Art', 'button/menu')) -%]
[%- IF cover_art.size > 1 -%]
[%- link_release(release, 'reorder_cover_art', l('Reorder Cover Art')) -%]
[%- END -%]
diff --git a/root/release/edit/layout.tt b/root/release/edit/layout.tt
index 2a8c541..48cdd48 100644
--- a/root/release/edit/layout.tt
+++ b/root/release/edit/layout.tt
@@ -3,7 +3,7 @@
[% ELSIF information.field('name').value %]
[% page_title = l('Add Release: {title}', { title => html_escape(information.field('name').value) }) %]
[% ELSE %]
- [% page_title = l('Add Release') %]
+ [% page_title = lp('Add Release', 'header') %]
[% END %]
[%- WRAPPER 'layout.tt' full_width=1 edit=1 title=page_title -%]
@@ -12,7 +12,7 @@
[% ELSIF information.field('name').value %]
<h1>[% l('Add Release: {title}', { title => html_escape(information.field('name').value) }) %]</h1>
[% ELSE %]
- <h1>[% l('Add Release') %]</h1>
+ <h1>[% lp('Add Release', 'header') %]</h1>
[% END %]
<form action="[% c.req.uri %]" method="post" class="release-editor">
diff --git a/root/release/edit/tracklist.tt b/root/release/edit/tracklist.tt
index bd2b588..06a0caa 100644
--- a/root/release/edit/tracklist.tt
+++ b/root/release/edit/tracklist.tt
@@ -483,7 +483,7 @@
</p>
</td>
<td class="buttons" style="margin: 10px; vertical-align: top;">
- <a href="#guesscase" style="float: right">[% lp('Guess case', 'button') %]</a>
+ <a href="#guesscase" style="float: right">[% lp('Guess case', 'button/menu') %]</a>
</td>
</tr>
</table>
commit 2239bfa441ab53566919a008fbb7acf410d6ecdc
Author: Ian McEwen <[email protected]>
Date: Sun Oct 7 16:58:18 2012 -0700
i18n: contextualize 'Add Cover Art'
diff --git a/root/release/add_cover_art.tt b/root/release/add_cover_art.tt
index 9be9f6a..5086e67 100644
--- a/root/release/add_cover_art.tt
+++ b/root/release/add_cover_art.tt
@@ -2,8 +2,8 @@
[%- script_manifest('edit.js.manifest') -%]
[%- END -%]
-[%- WRAPPER "release/layout.tt" title=l('Add Cover Art') page='add_cover_art' -%]
- <h2>[%- l('Add Cover Art') -%]</h2>
+[%- WRAPPER "release/layout.tt" title=lp('Add Cover Art', 'header') page='add_cover_art' -%]
+ <h2>[%- lp('Add Cover Art', 'header') -%]</h2>
<noscript>
<p>[% l('This page requires JavaScript.') %]</p>
diff --git a/root/release/cover_art.tt b/root/release/cover_art.tt
index 431d125..7961c94 100644
--- a/root/release/cover_art.tt
+++ b/root/release/cover_art.tt
@@ -46,7 +46,7 @@
[%- IF c.user_exists -%]
[%- IF release.may_have_cover_art -%]
<div class="buttons ui-helper-clearfix">
- [%- link_release(release, 'add_cover_art', l('Add Cover Art')) -%]
+ [%- link_release(release, 'add_cover_art', lp('Add Cover Art', 'button')) -%]
[%- IF cover_art.size > 1 -%]
[%- link_release(release, 'reorder_cover_art', l('Reorder Cover Art')) -%]
[%- END -%]
commit 7da9e13de2fab19882350610238708f9f2ffb3f6
Author: Ian McEwen <[email protected]>
Date: Sun Oct 7 16:56:51 2012 -0700
i18n: contextualize 'Guess case'
diff --git a/root/components/forms.tt b/root/components/forms.tt
index 08bcdaf..e844094 100644
--- a/root/components/forms.tt
+++ b/root/components/forms.tt
@@ -162,9 +162,9 @@
[%- MACRO guesscase BLOCK -%]
<fieldset class="guesscase">
- <legend>[% l('Guess case') %]</legend>
+ <legend>[% lp('Guess case', 'header') %]</legend>
<div style="float: right; margin: 10px;" class="buttons">
- <a href="#guesscase">[% l('Guess case') %]</a>
+ <a href="#guesscase">[% lp('Guess case', 'button') %]</a>
</div>
<p class="guesscase-options">
<select name="gc-mode" id="gc-mode"> </select>
@@ -185,7 +185,7 @@
[%- (l('Please use the Guess Case button to fix common style errors.')) -%]
</p>
<div class="buttons">
- <a href="#guesscase">[% l('Guess case') %]</a>
+ <a href="#guesscase">[% lp('Guess case', 'button') %]</a>
</div>
<div class="guesscase-options">
<table>
diff --git a/root/release/edit/tracklist.tt b/root/release/edit/tracklist.tt
index 8424fe8..bd2b588 100644
--- a/root/release/edit/tracklist.tt
+++ b/root/release/edit/tracklist.tt
@@ -465,7 +465,7 @@
[%#- FIXME: use guesscase() -%]
<fieldset class="guesscase">
- <legend>[% l('Guess case') %]</legend>
+ <legend>[% lp('Guess case', 'header') %]</legend>
<table style="width: 100%">
<tr>
<td class="icon" style="vertical-align: top; padding: 10px; width: 32px;">
@@ -483,7 +483,7 @@
</p>
</td>
<td class="buttons" style="margin: 10px; vertical-align: top;">
- <a href="#guesscase" style="float: right">[% l('Guess case') %]</a>
+ <a href="#guesscase" style="float: right">[% lp('Guess case', 'button') %]</a>
</td>
</tr>
</table>
-----------------------------------------------------------------------
hooks/post-receive
--
mb_server
_______________________________________________
MusicBrainz-commits mailing list
[email protected]
http://lists.musicbrainz.org/mailman/listinfo/musicbrainz-commits