r74571 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74570‎ | r74571 | r74572 >
Date:22:57, 9 October 2010
Author:bawolff
Status:deferred
Tags:
Comment:
Add support for most of the iptc4xmp stuff
Modified paths:
  • /branches/img_metadata/phase3/includes/media/FormatMetadata.php (modified) (history)
  • /branches/img_metadata/phase3/includes/media/IPTC.php (modified) (history)
  • /branches/img_metadata/phase3/includes/media/Jpeg.php (modified) (history)
  • /branches/img_metadata/phase3/includes/media/XMP.php (modified) (history)
  • /branches/img_metadata/phase3/includes/media/XMPInfo.php (modified) (history)
  • /branches/img_metadata/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /branches/img_metadata/phase3/maintenance/language/messageTypes.inc (modified) (history)
  • /branches/img_metadata/phase3/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: branches/img_metadata/phase3/maintenance/language/messages.inc
@@ -2756,12 +2756,14 @@
27572757 'exif-disclaimer',
27582758 'exif-contentwarning',
27592759 'exif-giffilecomment',
 2760+ 'exif-intellectualgenre',
27602761 ),
27612762 'exif-values' => array(
27622763 'exif-make-value',
27632764 'exif-model-value',
27642765 'exif-software-value',
27652766 'exif-software-version-value',
 2767+ 'exif-contact-value',
27662768 ),
27672769 'exif-compression' => array(
27682770 'exif-compression-1',
@@ -3002,6 +3004,25 @@
30033005 'exif-maxaperturevalue' => array(
30043006 'exif-maxaperturevalue-value',
30053007 ),
 3008+ 'exif-iimcategory' => array(
 3009+ 'exif-iimcategory-ace',
 3010+ 'exif-iimcategory-clj',
 3011+ 'exif-iimcategory-dis',
 3012+ 'exif-iimcategory-fin',
 3013+ 'exif-iimcategory-edu',
 3014+ 'exif-iimcategory-evn',
 3015+ 'exif-iimcategory-hth',
 3016+ 'exif-iimcategory-hum',
 3017+ 'exif-iimcategory-lab',
 3018+ 'exif-iimcategory-lif',
 3019+ 'exif-iimcategory-pol',
 3020+ 'exif-iimcategory-rel',
 3021+ 'exif-iimcategory-sci',
 3022+ 'exif-iimcategory-soi',
 3023+ 'exif-iimcategory-spo',
 3024+ 'exif-iimcategory-war',
 3025+ 'exif-iimcategory-wea',
 3026+ ),
30063027 'edit-externally' => array(
30073028 'edit-externally',
30083029 'edit-externally-help',
Index: branches/img_metadata/phase3/maintenance/language/messageTypes.inc
@@ -266,6 +266,7 @@
267267 'exif-lightsource-22',
268268 'exif-lightsource-23',
269269 'exif-filesource-3',
 270+ 'exif-contact-value',
270271 'booksources-isbn',
271272 'sp-contributions-explain',
272273 'sorbs',
@@ -674,4 +675,22 @@
675676 'exif-contentwarning',
676677 'exif-giffilecomment',
677678 'exif-maxaperturevalue-value',
 679+ 'exif-intellectualgenre',
 680+ 'exif-iimcategory-ace',
 681+ 'exif-iimcategory-clj',
 682+ 'exif-iimcategory-dis',
 683+ 'exif-iimcategory-fin',
 684+ 'exif-iimcategory-edu',
 685+ 'exif-iimcategory-evn',
 686+ 'exif-iimcategory-hth',
 687+ 'exif-iimcategory-hum',
 688+ 'exif-iimcategory-lab',
 689+ 'exif-iimcategory-lif',
 690+ 'exif-iimcategory-pol',
 691+ 'exif-iimcategory-rel',
 692+ 'exif-iimcategory-sci',
 693+ 'exif-iimcategory-soi',
 694+ 'exif-iimcategory-spo',
 695+ 'exif-iimcategory-war',
 696+ 'exif-iimcategory-wea',
678697 );
Index: branches/img_metadata/phase3/includes/media/FormatMetadata.php
@@ -104,7 +104,14 @@
105105 continue;
106106 }
107107
108 -
 108+ // The contact info is a multi-valued field
 109+ // instead of the other props which are single
 110+ // valued (mostly) so handle as a special case.
 111+ if ( $tag === 'Contact' ) {
 112+ $vals = self::collapseContactInfo( $vals );
 113+ continue;
 114+ }
 115+
109116 foreach ( $vals as &$val ) {
110117
111118 switch( $tag ) {
@@ -616,8 +623,28 @@
617624 break;
618625
619626
 627+ case 'iimCategory':
 628+ switch( strtolower($val) ) {
 629+ // See pg 29 of IPTC photo
 630+ // metadata standard.
 631+ case 'ace': case 'clj':
 632+ case 'dis': case 'fin':
 633+ case 'edu': case 'evn':
 634+ case 'hth': case 'hum':
 635+ case 'lab': case 'lif':
 636+ case 'pol': case 'rel':
 637+ case 'sci': case 'soi':
 638+ case 'spo': case 'war':
 639+ case 'wea':
 640+ $val = self::msg(
 641+ 'iimcategory',
 642+ $val
 643+ );
 644+ }
 645+ break;
620646 // Do not transform fields with pure text.
621 - // For some languages the formatNum() conversion results to wrong output like
 647+ // For some languages the formatNum()
 648+ // conversion results to wrong output like
622649 // foo,bar@example,com or foo٫bar@example٫com
623650 case 'ImageDescription':
624651 case 'Artist':
@@ -644,10 +671,8 @@
645672 case 'FixtureIdentifier':
646673 case 'LocationDest':
647674 case 'LocationDestCode':
648 - case 'Contact':
649675 case 'Writer':
650676 case 'JPEGFileComment':
651 - case 'iimCategory':
652677 case 'iimSupplementalCategory':
653678 case 'OriginalTransmissionRef':
654679 case 'Identifier':
@@ -740,9 +765,9 @@
741766 * @return String single value (in wiki-syntax).
742767 */
743768 public static function flattenArray( $vals, $type = 'ul' ) {
744 -
745769 if ( isset( $vals['_type'] ) ) {
746770 $type = $vals['_type'];
 771+ unset( $vals['_type'] );
747772 }
748773
749774 if ( !is_array( $vals ) ) {
@@ -1019,7 +1044,111 @@
10201045
10211046 return wfMsg( 'exif-coordinate-format', $deg, $min, $sec, $ref, $coord );
10221047 }
 1048+ /**
 1049+ * Format the contact info field into a single value.
 1050+ *
 1051+ * @param $vals Array array with fields of the ContactInfo
 1052+ * struct defined in the IPTC4XMP spec. Or potentially
 1053+ * an array with one element that is a free form text
 1054+ * value from the older iptc iim 1:118 prop.
 1055+ *
 1056+ * This function might be called from
 1057+ * JpegHandler::convertMetadataVersion which is why it is
 1058+ * public.
 1059+ *
 1060+ * @return String of html-ish looking wikitext
 1061+ */
 1062+ public function collapseContactInfo( $vals ) {
 1063+ if( ! ( isset( $vals['CiAdrExtadr'] )
 1064+ || isset( $vals['CiAdrCity'] )
 1065+ || isset( $vals['CiAdrCtry'] )
 1066+ || isset( $vals['CiEmailWork'] )
 1067+ || isset( $vals['CiTelWork'] )
 1068+ || isset( $vals['CiAdrPcode'] )
 1069+ || isset( $vals['CiAdrRegion'] )
 1070+ || isset( $vals['CiUrlWork'] )
 1071+ ) ) {
 1072+ // We don't have any sub-properties
 1073+ // This could happen if its using old
 1074+ // iptc that just had this as a free-form
 1075+ // text value.
 1076+ // Note: We run this through htmlspecialchars
 1077+ // partially to be consistent, and partially
 1078+ // because people often insert >, etc into
 1079+ // the metadata which should not be interperted
 1080+ // but we still want to auto-link urls.
 1081+ foreach( $vals as &$val ) {
 1082+ $val = htmlspecialchars( $val );
 1083+ }
 1084+ return self::flattenArray( $vals );
 1085+ } else {
 1086+ // We have a real ContactInfo field.
 1087+ // Its unclear if all these fields have to be
 1088+ // set, so assume they do not.
 1089+ $url = $tel = $street = $city = $country = '';
 1090+ $email = $postal = $region = '';
10231091
 1092+ // Also note, some of the class names this uses
 1093+ // are similar to those used by hCard. This is
 1094+ // mostly because they're sensible names. This
 1095+ // does not (and does not attempt to) output
 1096+ // stuff in the hCard microformat. However it
 1097+ // might output in the adr microformat.
 1098+
 1099+ if ( isset( $vals['CiAdrExtadr'] ) ) {
 1100+ // Todo: This can potentially be multi-line.
 1101+ // Need to check how that works in XMP.
 1102+ $street = '<span class="extended-address">'
 1103+ . htmlspecialchars(
 1104+ $vals['CiAdrExtadr'] )
 1105+ . '</span>';
 1106+ }
 1107+ if ( isset( $vals['CiAdrCity'] ) ) {
 1108+ $city = '<span class="locality">'
 1109+ . htmlspecialchars( $vals['CiAdrCity'] )
 1110+ . '</span>';
 1111+ }
 1112+ if ( isset( $vals['CiAdrCtry'] ) ) {
 1113+ $country = '<span class="country-name">'
 1114+ . htmlspecialchars( $vals['CiAdrCtry'] )
 1115+ . '</span>';
 1116+ }
 1117+ if ( isset( $vals['CiEmailWork'] ) ) {
 1118+ $email = '[mailto:'
 1119+ . rawurlencode(
 1120+ $vals['CiEmailWork'] )
 1121+ . ' <span class="email">'
 1122+ . $vals['CiEmailWork']
 1123+ . '</span>]';
 1124+ }
 1125+ if ( isset( $vals['CiTelWork'] ) ) {
 1126+ $tel = '<span class="tel">'
 1127+ . htmlspecialchars( $vals['CiTelWork'] )
 1128+ . '</span>';
 1129+ }
 1130+ if ( isset( $vals['CiAdrPcode'] ) ) {
 1131+ $postal = '<span class="postal-code">'
 1132+ . htmlspecialchars(
 1133+ $vals['CiAdrPcode'] )
 1134+ . '</span>';
 1135+ }
 1136+ if ( isset( $vals['CiAdrRegion'] ) ) {
 1137+ // Note this is province/state.
 1138+ $region = '<span class="region">'
 1139+ . htmlspecialchars(
 1140+ $vals['CiAdrRegion'] )
 1141+ . '</span>';
 1142+ }
 1143+ if ( isset( $vals['CiUrlWork'] ) ) {
 1144+ $url = '<span class="url">'
 1145+ . htmlspecialchars( $vals['CiUrlWork'] )
 1146+ . '</span>';
 1147+ }
 1148+ return wfMsg( 'exif-contact-value', $email, $url,
 1149+ $street, $city, $region, $postal, $country,
 1150+ $tel );
 1151+ }
 1152+ }
10241153 }
10251154
10261155 /** For compatability with old FormatExif class
Index: branches/img_metadata/phase3/includes/media/IPTC.php
@@ -267,11 +267,25 @@
268268 }
269269 break;
270270
 271+ case '2#004':
 272+ // IntellectualGenere.
 273+ // first 4 characters are an id code
 274+ // That we're not really interested in.
 275+ if ( strlen( $val[0] < 5 ) ) {
 276+ wfDebugLog( 'iptc', 'IPTC: '
 277+ . '2:04 too short. '
 278+ . 'Ignoring.' );
 279+ break;
 280+ }
 281+ $extracted = substr( $val[0], 4 );
 282+ $data['IntellectualGenre'] = $extracted;
 283+ break;
271284
 285+
272286 // Things not currently done, and not sure if should:
273287 // 2:12
274288 // purposely does not do 2:125, 2:130, 2:131,
275 - // 2:47, 2:50, 2:45, 2:42, 2:8, 2:4, 2:3
 289+ // 2:47, 2:50, 2:45, 2:42, 2:8, 2:3
276290 // 2:200, 2:201, 2:202
277291 // or the audio stuff (2:150 to 2:154)
278292
@@ -279,6 +293,8 @@
280294 case '2#060':
281295 case '2#063':
282296 case '2#085':
 297+ case '2#038':
 298+ case '2#035':
283299 //ignore. Handled elsewhere.
284300 break;
285301
Index: branches/img_metadata/phase3/includes/media/XMP.php
@@ -58,7 +58,7 @@
5959 const MODE_STRUCT = 11; // structure (associative array)
6060 const MODE_SEQ = 12; // orderd list
6161 const MODE_BAG = 13; // unordered list
62 - const MODE_LANG = 14; // lang alt. TODO: implement
 62+ const MODE_LANG = 14;
6363 const MODE_ALT = 15; // non-language alt. Currently not implemented, and not needed atm.
6464
6565 const NS_RDF = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#';
@@ -123,7 +123,27 @@
124124 public function getResults() {
125125 // xmp-special is for metadata that affects how stuff
126126 // is extracted. For example xmpNote:HasExtendedXMP.
 127+
 128+ // It is also used to handle photoshop:AuthorsPosition
 129+ // which is weird and really part of another property,
 130+ // see 2:85 in IPTC. See also pg 21 of IPTC4XMP standard.
 131+
127132 $data = $this->results;
 133+
 134+ if ( isset( $data['xmp-special']['AuthorsPosition'] )
 135+ && is_string( $data['xmp-special']['AuthorsPosition'] )
 136+ && isset( $data['xmp-general']['Artist'][0] )
 137+ ) {
 138+ // Note, if there is more than one creator,
 139+ // this only applies to first. This also will
 140+ // only apply to the dc:Creator prop, not the
 141+ // exif:Artist prop.
 142+
 143+ $data['xmp-general']['Artist'][0] =
 144+ $data['xmp-special']['AuthorsPosition'] . ', '
 145+ . $data['xmp-general']['Artist'][0];
 146+ }
 147+
128148 unset( $data['xmp-special'] );
129149
130150 // Convert GPSAltitude to negative if below sea level.
@@ -603,7 +623,7 @@
604624
605625 } else {
606626 // something else we don't recognize, like a qualifier maybe.
607 - wfDebugLog( 'XMP', __METHOD__ . " Encoutered element <$elm> where only expecting character data." );
 627+ wfDebugLog( 'XMP', __METHOD__ . " Encoutered element <$elm> where only expecting character data as value of " . $this->curItem[0] );
608628 array_unshift( $this->mode, self::MODE_IGNORE );
609629 array_unshift( $this->curItem, $elm );
610630
@@ -640,6 +660,19 @@
641661 if ( $ns !== self::NS_RDF ) {
642662
643663 if ( isset( $this->items[$ns][$tag] ) ) {
 664+ if ( isset( $this->items[$ns][$tag]['structPart'] ) ) {
 665+ // If this element is supposed to appear only as
 666+ // a child of a structure, but appears here (not as
 667+ // a child of a struct), then something weird is
 668+ // happening, so ignore this element and its children.
 669+
 670+ wfDebugLog( 'XMP', "Encoutered <$ns:$tag> outside"
 671+ . " of its expected parent. Ignoring." );
 672+
 673+ array_unshift( $this->mode, self::MODE_IGNORE );
 674+ array_unshift( $this->curItem, $ns . ' ' . $tag );
 675+ return;
 676+ }
644677 $mode = $this->items[$ns][$tag]['mode'];
645678 array_unshift( $this->mode, $mode );
646679 array_unshift( $this->curItem, $ns . ' ' . $tag );
@@ -653,6 +686,7 @@
654687 throw new MWException( 'tag nested in non-whitespace characters.' );
655688 }
656689 } else {
 690+ // This element is not on our list of allowed elements so ignore.
657691 array_unshift( $this->mode, self::MODE_IGNORE );
658692 array_unshift( $this->curItem, $ns . ' ' . $tag );
659693 return;
Index: branches/img_metadata/phase3/includes/media/XMPInfo.php
@@ -29,6 +29,7 @@
3030 * * choices - array of potential values (format of 'value' => true ). Only used with validateClosed
3131 * * rangeLow and rangeHigh - alternative to choices for numeric ranges. Again for validateClosed only.
3232 * * children - for MODE_STRUCT items, allowed children.
 33+ * * structPart - Indicates that this element can only appear as a memeber of a structure.
3334 *
3435 * currently this just has a bunch of exif values as this class is only half-done
3536 */
@@ -73,7 +74,7 @@
7475 'FlashEnergy' => array(
7576 'map_group' => 'exif',
7677 'mode' => XMPReader::MODE_SIMPLE,
77 - 'validate' => 'validateRational'
 78+ 'validate' => 'validateRational',
7879 ),
7980 'FNumber' => array(
8081 'map_group' => 'exif',
@@ -161,12 +162,14 @@
162163 'Fired' => array(
163164 'map_group' => 'exif',
164165 'validate' => 'validateBoolean',
165 - 'mode' => XMPReader::MODE_SIMPLE
 166+ 'mode' => XMPReader::MODE_SIMPLE,
 167+ 'structPart'=> true,
166168 ),
167169 'Function' => array(
168170 'map_group' => 'exif',
169171 'validate' => 'validateBoolean',
170172 'mode' => XMPReader::MODE_SIMPLE,
 173+ 'structPart'=> true,
171174 ),
172175 'Mode' => array(
173176 'map_group' => 'exif',
@@ -174,6 +177,7 @@
175178 'mode' => XMPReader::MODE_SIMPLE,
176179 'choices' => array( '0' => true, '1' => true,
177180 '2' => true, '3' => true ),
 181+ 'structPart'=> true,
178182 ),
179183 'Return' => array(
180184 'map_group' => 'exif',
@@ -181,11 +185,13 @@
182186 'mode' => XMPReader::MODE_SIMPLE,
183187 'choices' => array( '0' => true,
184188 '2' => true, '3' => true ),
 189+ 'structPart'=> true,
185190 ),
186191 'RedEyeMode' => array(
187192 'map_group' => 'exif',
188193 'validate' => 'validateBoolean',
189194 'mode' => XMPReader::MODE_SIMPLE,
 195+ 'structPart'=> true,
190196 ),
191197 /* End Flash */
192198 'ISOSpeedRatings' => array(
@@ -647,7 +653,7 @@
648654 ),
649655 'rights' => array(
650656 'map_group' => 'general',
651 - 'map_name' => 'dc-rights',
 657+ 'map_name' => 'Copyright',
652658 'mode' => XMPReader::MODE_LANG,
653659 ),
654660 // Note: source is not mapped with iptc source, since iptc
@@ -781,8 +787,164 @@
782788 'http://ns.adobe.com/xmp/note/' => array(
783789 'HasExtendedXMP' => array(
784790 'map_group' => 'special',
785 - 'mode' => XMPReader::MODE_SIMPLE,
 791+ 'mode' => XMPReader::MODE_SIMPLE,
786792 ),
787793 ),
 794+ /* Note, in iptc schemas, the legacy properties are denoted
 795+ * as deprected, since other properties should used instead,
 796+ * and properties marked as deprected in the standard are
 797+ * are marked as general here as they don't have replacements
 798+ */
 799+ 'http://ns.adobe.com/photoshop/1.0/' => array(
 800+ 'City' => array(
 801+ 'map_group' => 'deprected',
 802+ 'mode' => XMPReader::MODE_SIMPLE,
 803+ 'map_name' => 'CityDest',
 804+ ),
 805+ 'Country' => array(
 806+ 'map_group' => 'deprected',
 807+ 'mode' => XMPReader::MODE_SIMPLE,
 808+ 'map_name' => 'CountryDest',
 809+ ),
 810+ 'State' => array(
 811+ 'map_group' => 'deprected',
 812+ 'mode' => XMPReader::MODE_SIMPLE,
 813+ 'map_name' => 'ProvinceOrStateDest',
 814+ ),
 815+ 'DateCreated' => array(
 816+ 'map_group' => 'deprected',
 817+ // marking as deprected as the xmp prop prefered
 818+ 'mode' => XMPReader::MODE_SIMPLE,
 819+ 'map_name' => 'DateTimeOriginal',
 820+ 'validate' => 'validateDate',
 821+ // note this prop is an XMP, not IPTC date
 822+ ),
 823+ 'CaptionWriter' => array(
 824+ 'map_group' => 'general',
 825+ 'mode' => XMPReader::MODE_SIMPLE,
 826+ 'map_name' => 'Writer',
 827+ ),
 828+ 'Instructions' => array(
 829+ 'map_group' => 'general',
 830+ 'mode' => XMPReader::MODE_SIMPLE,
 831+ 'map_name' => 'SpecialInstructions',
 832+ ),
 833+ 'TransmissionReference' => array(
 834+ 'map_group' => 'general',
 835+ 'mode' => XMPReader::MODE_SIMPLE,
 836+ 'map_name' => 'OriginalTransmissionRef',
 837+ ),
 838+ 'AuthorsPosition' => array(
 839+ /* This corresponds with 2:85
 840+ * By-line Title, which needs to be
 841+ * handled weirdly to correspond
 842+ * with iptc/exif. */
 843+ 'map_group' => 'special',
 844+ 'mode' => XMPReader::MODE_SIMPLE
 845+ ),
 846+ 'Credit' => array(
 847+ 'map_group' => 'general',
 848+ 'mode' => XMPReader::MODE_SIMPLE,
 849+ ),
 850+ 'Source' => array(
 851+ 'map_group' => 'general',
 852+ 'mode' => XMPReader::MODE_SIMPLE,
 853+ ),
 854+ 'Urgency' => array(
 855+ 'map_group' => 'general',
 856+ 'mode' => XMPReader::MODE_SIMPLE,
 857+ ),
 858+ 'Category' => array(
 859+ // Note, this prop is deprected, but in general
 860+ // group since it doesn't have a replacement.
 861+ 'map_group' => 'general',
 862+ 'mode' => XMPReader::MODE_SIMPLE,
 863+ 'map_name' => 'iimCategory',
 864+ ),
 865+ 'SupplementalCategories' => array(
 866+ 'map_group' => 'general',
 867+ 'mode' => XMPReader::MODE_BAG,
 868+ 'map_name' => 'iimSupplementalCategory',
 869+ ),
 870+ ),
 871+ 'http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/' => array(
 872+ 'CountryCode' => array(
 873+ 'map_group' => 'deprected',
 874+ 'mode' => XMPReader::MODE_SIMPLE,
 875+ 'map_name' => 'CountryDestCode',
 876+ ),
 877+ 'IntellectualGenre' => array(
 878+ 'map_group' => 'general',
 879+ 'mode' => XMPReader::MODE_SIMPLE,
 880+ ),
 881+ /* Note: Scene not done. */
 882+ /* Note: SubjectCode (iim 2:12) not done. */
 883+ 'Location' => array(
 884+ 'map_group' => 'deprected',
 885+ 'mode' => XMPReader::MODE_SIMPLE,
 886+ 'map_name' => 'SublocationDest',
 887+ ),
 888+ 'CreatorContactInfo' => array(
 889+ /* Note this maps to 2:118 in iim
 890+ * (Contact) field. However those field
 891+ * types are slightly different - 2:118
 892+ * is free form text field, where this
 893+ * is more structured.
 894+ */
 895+ 'map_group' => 'general',
 896+ 'mode' => XMPReader::MODE_STRUCT,
 897+ 'map_name' => 'Contact',
 898+ 'children' => array(
 899+ 'CiAdrExtadr' => true,
 900+ 'CiAdrCity' => true,
 901+ 'CiAdrCtry' => true,
 902+ 'CiEmailWork' => true,
 903+ 'CiTelWork' => true,
 904+ 'CiAdrPcode' => true,
 905+ 'CiAdrRegion' => true,
 906+ 'CiUrlWork' => true,
 907+ ),
 908+ ),
 909+ 'CiAdrExtadr' => array( /* address */
 910+ 'map_group' => 'general',
 911+ 'mode' => XMPReader::MODE_SIMPLE,
 912+ 'structPart'=> true,
 913+ ),
 914+ 'CiAdrCity' => array( /* city */
 915+ 'map_group' => 'general',
 916+ 'mode' => XMPReader::MODE_SIMPLE,
 917+ 'structPart'=> true,
 918+ ),
 919+ 'CiAdrCtry' => array( /* country */
 920+ 'map_group' => 'general',
 921+ 'mode' => XMPReader::MODE_SIMPLE,
 922+ 'structPart'=> true,
 923+ ),
 924+ 'CiEmailWork' => array( /* email (possibly seperated by ',') */
 925+ 'map_group' => 'general',
 926+ 'mode' => XMPReader::MODE_SIMPLE,
 927+ 'structPart'=> true,
 928+ ),
 929+ 'CiTelWork' => array( /* telephone */
 930+ 'map_group' => 'general',
 931+ 'mode' => XMPReader::MODE_SIMPLE,
 932+ 'structPart'=> true,
 933+ ),
 934+ 'CiAdrPcode' => array( /* postal code */
 935+ 'map_group' => 'general',
 936+ 'mode' => XMPReader::MODE_SIMPLE,
 937+ 'structPart'=> true,
 938+ ),
 939+ 'CiAdrRegion' => array( /* province/state */
 940+ 'map_group' => 'general',
 941+ 'mode' => XMPReader::MODE_SIMPLE,
 942+ 'structPart'=> true,
 943+ ),
 944+ 'CiUrlWork' => array( /* url. Multiple may be seperated by comma. */
 945+ 'map_group' => 'general',
 946+ 'mode' => XMPReader::MODE_SIMPLE,
 947+ 'structPart'=> true,
 948+ ),
 949+ ),
788950 );
789951 }
Index: branches/img_metadata/phase3/includes/media/Jpeg.php
@@ -67,6 +67,13 @@
6868 . $metadata['Software'][0][1] . ')';
6969 }
7070
 71+ // ContactInfo also has to be dealt with specially
 72+ if ( isset( $metadata['Contact'] ) ) {
 73+ $metadata['Contact'] =
 74+ FormatMetadata::collapseContactInfo(
 75+ $metadata['Contact'] );
 76+ }
 77+
7178 foreach ( $metadata as &$val ) {
7279 if ( is_array( $val ) ) {
7380 $val = FormatMetadata::flattenArray( $val );
Index: branches/img_metadata/phase3/languages/messages/MessagesEn.php
@@ -3825,6 +3825,7 @@
38263826 'exif-disclaimer' => 'Disclaimer',
38273827 'exif-contentwarning' => 'Content warning',
38283828 'exif-giffilecomment' => 'GIF file comment',
 3829+'exif-intellectualgenre' => 'Type of item',
38293830
38303831
38313832 # Make & model, can be wikified in order to link to the camera and model name
@@ -4041,6 +4042,34 @@
40424043
40434044 'exif-maxaperturevalue-value' => '$1 APEX (f/$2)',
40444045
 4046+'exif-contact-value' => '$1
 4047+
 4048+$2
 4049+<div class="adr">
 4050+$3
 4051+
 4052+$4, $5, $6 $7
 4053+</div>
 4054+$8',
 4055+
 4056+'exif-iimcategory-ace' => 'Arts, culture and enterntainment',
 4057+'exif-iimcategory-clj' => 'Crime and law',
 4058+'exif-iimcategory-dis' => 'Disasters and accidents',
 4059+'exif-iimcategory-fin' => 'Economy and business',
 4060+'exif-iimcategory-edu' => 'Education',
 4061+'exif-iimcategory-evn' => 'Environment',
 4062+'exif-iimcategory-hth' => 'Health',
 4063+'exif-iimcategory-hum' => 'Human interest',
 4064+'exif-iimcategory-lab' => 'Labour',
 4065+'exif-iimcategory-lif' => 'Lifestyle and leisure',
 4066+'exif-iimcategory-pol' => 'Politics',
 4067+'exif-iimcategory-rel' => 'Religion and belief',
 4068+'exif-iimcategory-sci' => 'Science and technology',
 4069+'exif-iimcategory-soi' => 'Social issues',
 4070+'exif-iimcategory-spo' => 'Sports',
 4071+'exif-iimcategory-war' => 'War, conflict and unrest',
 4072+'exif-iimcategory-wea' => 'Weather',
 4073+
40454074 # External editor support
40464075 'edit-externally' => 'Edit this file using an external application',
40474076 'edit-externally-help' => '(See the [http://www.mediawiki.org/wiki/Manual:External_editors setup instructions] for more information)',

Follow-up revisions

RevisionCommit summaryAuthorDate
r74573Follow-up to r74571. Per Nickrabbit, my spelling is horrible....bawolff00:34, 10 October 2010

Status & tagging log