[open-ils-commits] r8253 - in trunk/build/i18n: po scripts

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Dec 20 14:48:37 EST 2007


Author: dbs
Date: 2007-12-20 14:26:51 -0500 (Thu, 20 Dec 2007)
New Revision: 8253

Added:
   trunk/build/i18n/po/ils_events.xml.pot
   trunk/build/i18n/scripts/ils_events.py
Log:
Enable translation of ils_events.xml, roundtripping from XML to POT to PO to XML.
Check in a current trunk version of the POT file.
Still need to enable <desc> elements for each xml:lang to merge into the ultimate XML file.


Added: trunk/build/i18n/po/ils_events.xml.pot
===================================================================
--- trunk/build/i18n/po/ils_events.xml.pot	                        (rev 0)
+++ trunk/build/i18n/po/ils_events.xml.pot	2007-12-20 19:26:51 UTC (rev 8253)
@@ -0,0 +1,852 @@
+# 
+msgid ""
+msgstr ""
+"Project-Id-Version: Evergreen 1.4\n"
+"Report-Msgid-Bugs-To: open-ils-dev at list.georgialibraries.org\n"
+"POT-Creation-Date: 2007-12-20 14:06:08-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: 1208.TITLE_LAST_COPY:66
+msgid "The last copy attached to a title is being removed or deleted"
+msgstr ""
+
+#: 1603.CONTAINER_USER_BUCKET_ITEM_NOT_FOUND:441
+msgid "The requested container_user_bucket_item was not found"
+msgstr ""
+
+#: 1598.MONEY_USER_CIRCULATION_SUMMARY_NOT_FOUND:426
+msgid "The requested money_user_circulation_summary was not found"
+msgstr ""
+
+#: 1621.CONTAINER_COPY_BUCKET_NOT_FOUND:494
+msgid "The requested container_copy_bucket was not found"
+msgstr ""
+
+#: 1218.ITEM_AGE_PROTECTED:104
+msgid "This item is too new to have a hold placed on it"
+msgstr ""
+
+#: 1214.PATRON_DUP_IDENT1:87
+msgid "The selected primary identification type and value are in use by another patron"
+msgstr ""
+
+#: 1561.PERMISSION_PERM_LIST_NOT_FOUND:318
+msgid "The requested permission_perm_list was not found"
+msgstr ""
+
+#: 1213.PATRON_BARRED:83
+msgid "The patron is barred"
+msgstr ""
+
+#: 1591.METABIB_SERIES_FIELD_ENTRY_NOT_FOUND:405
+msgid "The requested metabib_series_field_entry was not found"
+msgstr ""
+
+#: 8002.OFFLINE_FILE_ERROR:688
+msgid " An offline file or directory could not be created or accessed "
+msgstr ""
+
+#: 1502.ASSET_COPY_NOT_FOUND:173
+msgid ""
+"\n"
+"\t\t\tSomeone attempted to retrieve a copy object from the \n"
+"\t\t\tsystem and the object was not found.\n"
+"\t\t"
+msgstr ""
+
+#: 1639.REPORTER_SCHEDULE_NOT_FOUND:548
+msgid "The requested reporter_schedule was not found"
+msgstr ""
+
+#: 0.SUCCESS:14
+msgid " "
+msgstr ""
+
+#: 7006.COPY_IS_REFERENCE:638
+msgid " Copy is reference material "
+msgstr ""
+
+#: 1609.CONFIG_RULES_RECURING_FINE_NOT_FOUND:459
+msgid "The requested config_rules_recuring_fine was not found"
+msgstr ""
+
+#: 1608.METABIB_SUBJECT_FIELD_ENTRY_NOT_FOUND:456
+msgid "The requested metabib_subject_field_entry was not found"
+msgstr ""
+
+#: 2001.DATABASE_UPDATE_FAILED:596
+msgid "The attempt to write to the DB failed"
+msgstr ""
+
+#: 1507.CONTAINER_ITEM_NOT_FOUND:196
+msgid ""
+"\n"
+"\t\t\tSomeone attempted to retrieve a container item object from the \n"
+"\t\t\tsystem and the object was not found.\n"
+"\t\t"
+msgstr ""
+
+#: 1538.ACTION_SURVEY_RESPONSE_NOT_FOUND:253
+msgid "The requested action_survey_response was not found"
+msgstr ""
+
+#: 1555.MONEY_OPEN_BILLABLE_TRANSACTION_SUMMARY_NOT_FOUND:301
+msgid "The requested money_open_billable_transaction_summary was not found"
+msgstr ""
+
+#: 1554.CONFIG_RULES_CIRC_DURATION_NOT_FOUND:298
+msgid "The requested config_rules_circ_duration was not found"
+msgstr ""
+
+#: 1607.ACTION_OPEN_CIRCULATION_NOT_FOUND:453
+msgid "The requested action_open_circulation was not found"
+msgstr ""
+
+#: 1559.METABIB_FULL_REC_NOT_FOUND:312
+msgid "The requested metabib_full_rec was not found"
+msgstr ""
+
+#: 1527.OPEN_TCN_NOT_FOUND:219
+msgid "No TCN could be found that does not collide with existing records"
+msgstr ""
+
+#: 8000.OFFLINE_SESSION_ACTIVE:682
+msgid " An offline session for this location is currently processing "
+msgstr ""
+
+#: 1563.METABIB_KEYWORD_FIELD_ENTRY_NOT_FOUND:324
+msgid "The requested metabib_keyword_field_entry was not found"
+msgstr ""
+
+#: 1546.CONFIG_AUDIENCE_MAP_NOT_FOUND:277
+msgid "The requested config_audience_map was not found"
+msgstr ""
+
+#: 1001.NO_SESSION:26
+msgid "User login session has either timed out or does not exist"
+msgstr ""
+
+#: 1525.BILLING_NOT_FOUND:215
+msgid " Requested billing note does not exist "
+msgstr ""
+
+#: 8001.OFFLINE_SESSION_FILE_EXISTS:685
+msgid " An offline file for this workstation exists within this session "
+msgstr ""
+
+#: 1529.ACTOR_WORKSTATION_NOT_FOUND:227
+msgid "The requested actor_workstation was not found"
+msgstr ""
+
+#: 1227.COPY_DELETE_WARNING:140
+msgid "The copy in question is not in an ideal status for deleting"
+msgstr ""
+
+#: 1223.PATRON_NO_PHONE:122
+msgid "The user does not have a valid phone number assigned"
+msgstr ""
+
+#: 1002.ACTOR_USER_NOT_FOUND:29
+msgid "Someone attempted to retrieve a user from the system and the user was not found"
+msgstr ""
+
+#: 1636.REPORTER_OUTPUT_FOLDER_NOT_FOUND:539
+msgid "The requested reporter_output_folder was not found"
+msgstr ""
+
+#: 1217.PATRON_INACTIVE:101
+msgid "This account is marked as inactive"
+msgstr ""
+
+#: 1637.REPORTER_REPORT_FOLDER_NOT_FOUND:542
+msgid "The requested reporter_report_folder was not found"
+msgstr ""
+
+#: 1545.PERM_EX_NOT_FOUND:274
+msgid "The requested perm_ex was not found"
+msgstr ""
+
+#: 1553.ACTOR_ORG_UNIT_CLOSED_DATE_NOT_FOUND:295
+msgid "The requested actor_org_unit_closed_date was not found"
+msgstr ""
+
+#: 1541.AUTHORITY_RECORD_DESCRIPTOR_NOT_FOUND:262
+msgid "The requested authority_record_descriptor was not found"
+msgstr ""
+
+#: 7011.COPY_STATUS_LOST:653
+msgid "Copy has is marked as lost"
+msgstr ""
+
+#: 1587.CONTAINER_CALL_NUMBER_BUCKET_NOT_FOUND:393
+msgid "The requested container_call_number_bucket was not found"
+msgstr ""
+
+#: 1229.VOLUME_DELETED:147
+msgid "The requested volume is marked as deleted"
+msgstr ""
+
+#: 1635.REPORTER_REPORT_NOT_FOUND:536
+msgid "The requested reporter_report was not found"
+msgstr ""
+
+#: 1631.MONEY_COLLECTIONS_TRACKER_NOT_FOUND:524
+#: 1632.CONFIG_RULES_AGE_HOLD_PROTECT_NOT_FOUND:527
+#: 1633.MONEY_DESK_PAYMENT_NOT_FOUND:530
+msgid "The requested money_collections_tracker was not found"
+msgstr ""
+
+#: 5000.PERM_FAILURE:605
+msgid "Permission Denied"
+msgstr ""
+
+#: 7015.NEGATIVE_PATRON_BALANCE:665
+msgid "This requested action would result in a negative patron balance"
+msgstr ""
+
+#: 1569.ACTOR_USER_STANDING_PENALTY_NOT_FOUND:342
+msgid "The requested actor_user_standing_penalty was not found"
+msgstr ""
+
+#: 1200.USERNAME_EXISTS:39
+msgid "The given username already exists in the database"
+msgstr ""
+
+#: 9000.REPORT_TEMPLATE_EXISTS:716
+msgid " A report template with the given name and folder already exists"
+msgstr ""
+
+#: 1602.ACTOR_STAT_CAT_ENTRY_NOT_FOUND:438
+msgid "The requested actor_stat_cat_entry was not found"
+msgstr ""
+
+#: 1710.CONTAINER_EXISTS:588
+msgid "User has already created a bucket with the requested name"
+msgstr ""
+
+#: 1575.CONTAINER_BIBLIO_RECORD_ENTRY_BUCKET_NOT_FOUND:358
+msgid "The requested container_biblio_record_entry_bucket was not found"
+msgstr ""
+
+#: 1701.COPY_LOCATION_EXISTS:561
+msgid " The copy location object already exists "
+msgstr ""
+
+#: 1703.WORKSTATION_NAME_EXISTS:567
+msgid " A workstation with that name already exists "
+msgstr ""
+
+#: 1619.ACTOR_STAT_CAT_ENTRY_USER_MAP_NOT_FOUND:488
+msgid "The requested actor_stat_cat_entry_user_map was not found"
+msgstr ""
+
+#: 8007.OFFLINE_SESSION_EXISTS:703
+msgid " A session with the given name already exists "
+msgstr ""
+
+#: 1558.ASSET_COPY_NOTE_NOT_FOUND:309
+msgid "The requested asset_copy_note was not found"
+msgstr ""
+
+#: 7017.ROUTE_TO_COPY_LOCATION:674
+msgid ""
+" \n"
+"\t\tA copy needs to be routed to a copy location.  The location\n"
+"\t\tshould be specified within the event with a 'location' key\n"
+"\t\t"
+msgstr ""
+
+#: 1504.ACTION_TRANSIT_COPY_NOT_FOUND:182
+msgid ""
+"\n"
+"\t\t\tSomeone attempted to retrieve a transit object from the \n"
+"\t\t\tsystem and the object was not found.\n"
+"\t\t"
+msgstr ""
+
+#: 1624.MONEY_PAYMENT_NOT_FOUND:503
+msgid "The requested money_payment was not found"
+msgstr ""
+
+#: 1596.ACTOR_ORG_UNIT_TYPE_NOT_FOUND:420
+msgid "The requested actor_org_unit_type was not found"
+msgstr ""
+
+#: 1004.Z3950_BAD_QUERY:35
+msgid "The Z query is not formatted correctly"
+msgstr ""
+
+#: 1205.CARD_EXISTS:57
+msgid "The given user barcode already exists"
+msgstr ""
+
+#: 1584.ACTOR_ORG_ADDRESS_NOT_FOUND:385
+msgid "The requested actor_org_address was not found"
+msgstr ""
+
+#: 1501.BIBLIO_RECORD_ENTRY_NOT_FOUND:167
+msgid "The requested biblio_record_entry was not found"
+msgstr ""
+
+#: 1613.PERMISSION_GRP_TREE_NOT_FOUND:470
+msgid "The requested permission_grp_tree was not found"
+msgstr ""
+
+#: 1523.TITLE_NOTE_NOT_FOUND:212
+msgid " Requested title note does not exist "
+msgstr ""
+
+#: 9001.REPORT_REPORT_EXISTS:720
+msgid " A report with the given name and folder already exists"
+msgstr ""
+
+#: 1536.ACTION_IN_HOUSE_USE_NOT_FOUND:248
+msgid "The requested action_in_house_use was not found"
+msgstr ""
+
+#: 7016.ITEM_ON_HOLDS_SHELF:668
+msgid "This requested item is currently on the holds shelf"
+msgstr ""
+
+#: 7005.LOCATION_CIRC_NOT_ALLOWED:635
+msgid " Location does not allow materials to circulate "
+msgstr ""
+
+#: 1562.METABIB_METARECORD_SOURCE_MAP_NOT_FOUND:321
+msgid "The requested metabib_metarecord_source_map was not found"
+msgstr ""
+
+#: 1531.ACTION_SURVEY_QUESTION_NOT_FOUND:233
+msgid "The requested action_survey_question was not found"
+msgstr ""
+
+#: 1612.CONFIG_RULES_MAX_FINE_NOT_FOUND:467
+msgid "The requested config_rules_max_fine was not found"
+msgstr ""
+
+#: 1557.ACTOR_ORG_UNIT_SETTING_NOT_FOUND:306
+msgid "The requested actor_org_unit_setting was not found"
+msgstr ""
+
+#: 7009.CIRC_CLAIMS_RETURNED:647
+msgid " Requested circulation is marked claims returned "
+msgstr ""
+
+#: 1629.PERMISSION_USR_GRP_MAP_NOT_FOUND:517
+msgid "The requested permission_usr_grp_map was not found"
+msgstr ""
+
+#: 1606.MONEY_WORK_PAYMENT_NOT_FOUND:450
+msgid "The requested money_work_payment was not found"
+msgstr ""
+
+#: 2000.BAD_PARAMS:593
+msgid "Invalid parameters were encountered in a method"
+msgstr ""
+
+#: 1564.MONEY_CASH_PAYMENT_NOT_FOUND:327
+msgid "The requested money_cash_payment was not found"
+msgstr ""
+
+#: 1221.ORG_CANNOT_HAVE_VOLS:115
+msgid "The selected location cannot have volumes attached"
+msgstr ""
+
+#: 1704.TCN_EXISTS:570
+msgid "A record already exists with the requested TCN value"
+msgstr ""
+
+#: 1.UNKNOWN:17
+msgid "Placeholder event.  Used for development only"
+msgstr ""
+
+#: 1622.BIBLIO_RECORD_NODE_NOT_FOUND:497
+msgid "The requested biblio_record_node was not found"
+msgstr ""
+
+#: 8003.OFFLINE_PARAM_ERROR:691
+msgid " Missing params in offline upload "
+msgstr ""
+
+#: 1534.ACTOR_USER_SETTING_NOT_FOUND:242
+msgid "The requested actor_user_setting was not found"
+msgstr ""
+
+#: 1211.BILL_ALREADY_VOIDED:76
+msgid "The selecte bill has already been voided"
+msgstr ""
+
+#: 1222.PATRON_NO_EMAIL_ADDRESS:119
+msgid "The user does not have a valid email address assigned"
+msgstr ""
+
+#: 7001.PATRON_BAD_STANDING:622
+msgid ""
+"\n"
+"\t\t\tThe patron in question is not able to check out materials because\n"
+"\t\t\ttheir account is in bad standing\n"
+"\t\t"
+msgstr ""
+
+#: 1215.CIRC_EXCEEDS_COPY_RANGE:94
+msgid ""
+"\n"
+"\t\t\tThe selected copy may not circulate because the recipient's home \n"
+"\t\t\tlocation is not within the copy's circulation range\n"
+"\t\t"
+msgstr ""
+
+#: 1605.CONFIG_LIT_FORM_MAP_NOT_FOUND:447
+msgid "The requested config_lit_form_map was not found"
+msgstr ""
+
+#: 1567.METABIB_RECORD_DESCRIPTOR_NOT_FOUND:336
+msgid "The requested metabib_record_descriptor was not found"
+msgstr ""
+
+#: 1702.OPEN_CIRCULATION_EXISTS:564
+msgid " There is an open circulation on the requested item "
+msgstr ""
+
+#: 8009.OFFLINE_NO_ORG:709 8010.OFFLINE_SESSION_COMPLETE:712
+msgid " No org id was provided "
+msgstr ""
+
+#: 1630.ACTOR_USER_NOTE_NOT_FOUND:520
+msgid "The requested actor_user_note was not found"
+msgstr ""
+
+#: 1508.ASSET_CALL_NUMBER_NOT_FOUND:199
+msgid "Requested asset_call_number was not found"
+msgstr ""
+
+#: 1209.Z3950_LOGIN_FAILED:69
+msgid "The login failed"
+msgstr ""
+
+#: 1543.MONEY_CREDIT_CARD_PAYMENT_NOT_FOUND:268
+msgid "The requested money_credit_card_payment was not found"
+msgstr ""
+
+#: 1614.ACTION_SURVEY_ANSWER_NOT_FOUND:473
+msgid "The requested action_survey_answer was not found"
+msgstr ""
+
+#: 1535.METABIB_AUTHOR_FIELD_ENTRY_NOT_FOUND:245
+msgid "The requested metabib_author_field_entry was not found"
+msgstr ""
+
+#: 1626.ASSET_STAT_CAT_ENTRY_NOT_FOUND:509
+msgid "The requested asset_stat_cat_entry was not found"
+msgstr ""
+
+#: 1595.CONFIG_NON_CATALOGED_TYPE_NOT_FOUND:417
+msgid "The requested config_non_cataloged_type was not found"
+msgstr ""
+
+#: 1225.TRANSIT_ABORT_NOT_ALLOWED:128
+msgid "The transit on this item may not be aborted due to the state the item is in"
+msgstr ""
+
+#: 1542.CONFIG_LANGUAGE_MAP_NOT_FOUND:265
+msgid "The requested config_language_map was not found"
+msgstr ""
+
+#: 1206.VOLUME_NOT_EMPTY:60
+msgid "The selected volume has copies attached"
+msgstr ""
+
+#: 1540.AUTHORITY_RECORD_ENTRY_NOT_FOUND:259
+msgid "The requested authority_record_entry was not found"
+msgstr ""
+
+#: 1203.COPY_BAD_STATUS:48
+msgid "The given copy is not in a standard circulation status"
+msgstr ""
+
+#: 1601.MONEY_BILLABLE_TRANSACTION_NOT_FOUND:435
+msgid "The requested money_billable_transaction was not found"
+msgstr ""
+
+#: 7004.COPY_NOT_AVAILABLE:632
+msgid " Copy is not available "
+msgstr ""
+
+#: 1550.MONEY_OPEN_USER_SUMMARY_NOT_FOUND:287
+msgid "The requested money_open_user_summary was not found"
+msgstr ""
+
+#: 1207.REFUND_EXCEEDS_BALANCE:63
+msgid "A refund greater than the negative balance on a transaction was provided"
+msgstr ""
+
+#: 3.NO_CHANGE:20
+msgid "No change occurred"
+msgstr ""
+
+#: 1201.CIRC_PERMIT_BAD_KEY:42
+msgid "A checkout was attempted without a valid checkout permit key"
+msgstr ""
+
+#: 1593.MONEY_CREDIT_PAYMENT_NOT_FOUND:411
+msgid "The requested money_credit_payment was not found"
+msgstr ""
+
+#: 1618.METABIB_TITLE_FIELD_ENTRY_NOT_FOUND:485
+msgid "The requested metabib_title_field_entry was not found"
+msgstr ""
+
+#: 1202.ITEM_NOT_CATALOGED:45
+msgid "The requested item is not cataloged in the database"
+msgstr ""
+
+#: 1628.MONEY_BILLING_NOT_FOUND:514
+msgid "The requested money_billing was not found"
+msgstr ""
+
+#: 1544.CONFIG_METABIB_FIELD_NOT_FOUND:271
+msgid "The requested config_metabib_field was not found"
+msgstr ""
+
+#: 2002.DATABASE_QUERY_FAILED:599
+msgid "The attempt to query to the DB failed"
+msgstr ""
+
+#: 1549.CONFIG_STANDING_NOT_FOUND:284
+msgid "The requested config_standing was not found"
+msgstr ""
+
+#: 1210.INCORRECT_PASSWORD:73
+msgid "The provided password is not correct"
+msgstr ""
+
+#: 1582.CONFIG_ITEM_TYPE_MAP_NOT_FOUND:379
+msgid "The requested config_item_type_map was not found"
+msgstr ""
+
+#: 1530.CONFIG_IDENTIFICATION_TYPE_NOT_FOUND:230
+msgid "The requested config_identification_type was not found"
+msgstr ""
+
+#: 1579.ASSET_COPY_LOCATION_NOT_FOUND:370
+msgid "The requested asset_copy_location was not found"
+msgstr ""
+
+#: 1571.ASSET_CALL_NUMBER_NOTE_NOT_FOUND:347
+msgid "The requested asset_call_number_note was not found"
+msgstr ""
+
+#: 1528.ACTOR_USER_ADDRESS_NOT_FOUND:222
+msgid "Requested address was not found"
+msgstr ""
+
+#: 7002.PATRON_EXCEEDS_CHECKOUT_COUNT:626
+msgid "The patron in question has the maximum number of items already checked out"
+msgstr ""
+
+#: 1003.Z3950_SEARCH_FAILED:32
+msgid "The Z search did not succeed"
+msgstr ""
+
+#: 1533.ACTOR_USR_NOTE_NOT_FOUND:239
+msgid "The requested actor_usr_note was not found"
+msgstr ""
+
+#: 1620.PERMISSION_GRP_PERM_MAP_NOT_FOUND:491
+msgid "The requested permission_grp_perm_map was not found"
+msgstr ""
+
+#: 1204.CIRC_BAD_STATUS:54
+msgid ""
+"\n"
+"\t\t\tThe given circulation is not in a standard status or\n"
+"\t\t\tthe circulation was never fully closed properly\n"
+"\t\t"
+msgstr ""
+
+#: 1709.MAX_HOLDS:585
+msgid "User has reached the maximum number of holds"
+msgstr ""
+
+#: 1706.ITEM_BARCODE_EXISTS:576
+msgid "An item with the same barcode exists"
+msgstr ""
+
+#: 7014.COPY_IN_TRANSIT:662
+msgid "Copy is in transit"
+msgstr ""
+
+#: 1219.COPY_REMOTE_CIRC_LIB:107 1220.ITEM_NOT_HOLDABLE:111
+msgid "A copy with a remote circulating library (circ_lib) was encountered"
+msgstr ""
+
+#: 7000.ROUTE_ITEM:615
+msgid ""
+" \n"
+"\t\t\tA copy needs to be routed to a different location\t\n"
+"\t\t\tThe destination location will be specified by an 'org' key\n"
+"\t\t\twithin the event object\n"
+"\t\t"
+msgstr ""
+
+#: 7007.COPY_NEEDED_FOR_HOLD:641
+msgid " Copy is needed to fulfil a hold "
+msgstr ""
+
+#: 7010.COPY_ALERT_MESSAGE:650
+msgid " The requested copy has an alert message attached "
+msgstr ""
+
+#: 1231.RECORD_NOT_EMPTY:154
+msgid "The selected bib record has volumes attached"
+msgstr ""
+
+#: 1503.ACTION_HOLD_REQUEST_NOT_FOUND:176
+msgid "The requested action_hold_request was not found"
+msgstr ""
+
+#: 1212.PATRON_EXCEEDS_OVERDUE_COUNT:79
+msgid "The patron has too many overdue items"
+msgstr ""
+
+#: 1578.ACTION_HOLD_NOTIFICATION_NOT_FOUND:367
+msgid "The requested action_hold_notification was not found"
+msgstr ""
+
+#: 1610.MONEY_CHECK_PAYMENT_NOT_FOUND:462
+msgid "The requested money_check_payment was not found"
+msgstr ""
+
+#: 1623.PERMISSION_USR_PERM_MAP_NOT_FOUND:500
+msgid "The requested permission_usr_perm_map was not found"
+msgstr ""
+
+#: 1581.ASSET_STAT_CAT_ENTRY_COPY_MAP_NOT_FOUND:376
+msgid "The requested asset_stat_cat_entry_copy_map was not found"
+msgstr ""
+
+#: 1547.CONFIG_ITEM_FORM_MAP_NOT_FOUND:280
+msgid "The requested config_item_form_map was not found"
+msgstr ""
+
+#: 1592.CONTAINER_USER_BUCKET_NOT_FOUND:408
+msgid "The requested container_user_bucket was not found"
+msgstr ""
+
+#: 1617.ACTION_UNFULFILLED_HOLD_LIST_NOT_FOUND:482
+msgid "The requested action_unfulfilled_hold_list was not found"
+msgstr ""
+
+#: 1552.ACTOR_ORG_UNIT_HOURS_OF_OPERATION_NOT_FOUND:292
+msgid "The requested actor_org_unit_hours_of_operation was not found"
+msgstr ""
+
+#: 1576.EX_NOT_FOUND:361
+msgid "The requested ex was not found"
+msgstr ""
+
+#: 8004.OFFLINE_CONFIG_ERROR:694 8005.OFFLINE_CHECKSUM_FAILED:697
+#: 8006.OFFLINE_SESSION_NOT_FOUND:700
+msgid " Offline server is not configured properly "
+msgstr ""
+
+#: 1568.CONFIG_COPY_STATUS_NOT_FOUND:339
+msgid "The requested config_copy_status was not found"
+msgstr ""
+
+#: 1539.CONTAINER_COPY_BUCKET_ITEM_NOT_FOUND:256
+msgid "The requested container_copy_bucket_item was not found"
+msgstr ""
+
+#: 1590.ACTOR_STAT_CAT_NOT_FOUND:402
+msgid "The requested actor_stat_cat was not found"
+msgstr ""
+
+#: 7003.COPY_CIRC_NOT_ALLOWED:629
+msgid " Target copy is not allowed to circulate "
+msgstr ""
+
+#: 7008.MAX_RENEWALS_REACHED:644
+msgid " Circulation has no more renewals remaining "
+msgstr ""
+
+#: 1577.ACTION_HOLD_COPY_MAP_NOT_FOUND:364
+msgid "The requested action_hold_copy_map was not found"
+msgstr ""
+
+#: 1638.REPORTER_TEMPLATE_FOLDER_NOT_FOUND:545
+msgid "The requested reporter_template_folder was not found"
+msgstr ""
+
+#: 1500.ACTION_CIRCULATION_NOT_FOUND:164
+msgid ""
+"\n"
+"\t\t\tSomeone attempted to retrieve a circulation object from the system and \n"
+"\t\t\tthe object was not found.\n"
+"\t\t"
+msgstr ""
+
+#: 1226.REFUND_EXCEEDS_DESK_PAYMENTS:135
+msgid ""
+"\n"
+"\t\t\tThis refund amount is not allowed because it exceeds \n"
+"\t\t\tthe total amount of desk payments for this transaction.\n"
+"\t\t"
+msgstr ""
+
+#: 1616.MONEY_OPEN_USER_CIRCULATION_SUMMARY_NOT_FOUND:479
+msgid "The requested money_open_user_circulation_summary was not found"
+msgstr ""
+
+#: 1583.ACTION_SURVEY_NOT_FOUND:382
+msgid "The requested action_survey was not found"
+msgstr ""
+
+#: 1625.CONTAINER_BIBLIO_RECORD_ENTRY_BUCKET_ITEM_NOT_FOUND:506
+msgid "The requested container_biblio_record_entry_bucket_item was not found"
+msgstr ""
+
+#: 1000.LOGIN_FAILED:23
+msgid "User login failed"
+msgstr ""
+
+#: 1599.MONEY_GROCERY_NOT_FOUND:429
+msgid "The requested money_grocery was not found"
+msgstr ""
+
+#: 7012.COPY_STATUS_MISSING:656
+msgid "Copy has is marked as missing"
+msgstr ""
+
+#: 1532.MONEY_BILLABLE_TRANSACTION_SUMMARY_NOT_FOUND:236
+msgid "The requested money_billable_transaction_summary was not found"
+msgstr ""
+
+#: 2003.INTERNAL_SERVER_ERROR:602
+msgid "There was an internal server error"
+msgstr ""
+
+#: 8008.OFFLINE_INVALID_SESSION:706
+msgid " The session name is invalid "
+msgstr ""
+
+#: 1597.BIBLIO_RECORD_NOTE_NOT_FOUND:423
+msgid "The requested biblio_record_note was not found"
+msgstr ""
+
+#: 1588.ASSET_STAT_CAT_NOT_FOUND:396
+msgid "The requested asset_stat_cat was not found"
+msgstr ""
+
+#: 1224.PATRON_ACCOUNT_EXPIRED:125
+msgid "The patron's account has expired"
+msgstr ""
+
+#: 1560.METABIB_METARECORD_NOT_FOUND:315
+msgid "The requested metabib_metarecord was not found"
+msgstr ""
+
+#: 1707.HOLD_EXISTS:579
+msgid "User already has an open hold on the selected item"
+msgstr ""
+
+#: 1506.CONTAINER_NOT_FOUND:190
+msgid ""
+"\n"
+"\t\t\tSomeone attempted to retrieve a container object from the \n"
+"\t\t\tsystem and the object was not found.\n"
+"\t\t"
+msgstr ""
+
+#: 1566.MONEY_FORGIVE_PAYMENT_NOT_FOUND:333
+msgid "The requested money_forgive_payment was not found"
+msgstr ""
+
+#: 1230.XACT_COLLISION:150
+msgid "The saved item has been edited by another user"
+msgstr ""
+
+#: 1700.NON_CAT_TYPE_EXISTS:558
+msgid " The non-cataloged type object already exists "
+msgstr ""
+
+#: 1708.MONEY_COLLECTIONS_TRACKER_EXISTS:582
+msgid "A duplicate money.collections_tracker object already exists in the database"
+msgstr ""
+
+#: 1634.REPORTER_TEMPLATE_NOT_FOUND:533
+msgid "The requested reporter_template was not found"
+msgstr ""
+
+#: 1600.CONFIG_BIB_SOURCE_NOT_FOUND:432
+msgid "The requested config_bib_source was not found"
+msgstr ""
+
+#: 1228.BIB_RECORD_DELETED:144
+msgid "The requested bib record is marked as deleted"
+msgstr ""
+
+#: 1705.VOLUME_LABEL_EXISTS:573
+msgid "A volume with the same label, title and owning library exists"
+msgstr ""
+
+#: 1589.ACTOR_CARD_NOT_FOUND:399
+msgid "The requested actor_card was not found"
+msgstr ""
+
+#: 1216.PATRON_CARD_INACTIVE:98
+msgid "The patron's card is not active"
+msgstr ""
+
+#: 7013.PATRON_EXCEEDS_FINES:659
+msgid "The patron in question has reached the maximum fine amount"
+msgstr ""
+
+#: 1586.ACTOR_ORG_UNIT_NOT_FOUND:390
+msgid "The requested actor_org_unit was not found"
+msgstr ""
+
+#: 1574.CONTAINER_CALL_NUMBER_BUCKET_ITEM_NOT_FOUND:355
+msgid "The requested container_call_number_bucket_item was not found"
+msgstr ""
+
+#: 1518.ACTION_HOLD_TRANSIT_COPY_NOT_FOUND:204
+msgid "The requested action_hold_transit_copy was not found"
+msgstr ""
+
+#: 1594.AUTHORITY_FULL_REC_NOT_FOUND:414
+msgid "The requested authority_full_rec was not found"
+msgstr ""
+
+#: 1565.ACTOR_PROFILE_NOT_FOUND:330
+msgid "The requested actor_profile was not found"
+msgstr ""
+
+#: 1580.METABIB_VIRTUAL_RECORD_NOT_FOUND:373
+msgid "The requested metabib_virtual_record was not found"
+msgstr ""
+
+#: 1640.ACTOR_USR_ORG_UNIT_OPT_IN_NOT_FOUND:551
+msgid "The requested actor_usr_org_unit_opt_in was not found"
+msgstr ""
+
+#: 1572.AUTHORITY_RECORD_NOTE_NOT_FOUND:350
+msgid "The requested authority_record_note was not found"
+msgstr ""
+
+#: 1520.WORKSTATION_NOT_FOUND:209
+msgid " Requested workstation object does not exist "
+msgstr ""
+
+#: 1615.ACTION_NON_CATALOGED_CIRCULATION_NOT_FOUND:476
+msgid "The requested action_non_cataloged_circulation was not found"
+msgstr ""
+
+#: 1604.MONEY_USER_SUMMARY_NOT_FOUND:444
+msgid "The requested money_user_summary was not found"
+msgstr ""

Added: trunk/build/i18n/scripts/ils_events.py
===================================================================
--- trunk/build/i18n/scripts/ils_events.py	                        (rev 0)
+++ trunk/build/i18n/scripts/ils_events.py	2007-12-20 19:26:51 UTC (rev 8253)
@@ -0,0 +1,223 @@
+#!/usr/bin/env python
+# ils_events.py
+"""
+This class enables translation of Evergreen's ils_events XML file.
+
+Requires polib from http://polib.googlecode.com
+
+Source event definitions are structured as follows:
+<ils_events>
+    <event code='1' textcode='UNKNOWN'>
+        <desc xml:lang="en-US">Placeholder event.  Used for development only</desc>
+     </event>
+</ils_events>
+
+This generates an updated file with the following structure:
+<ils_events>
+    <event code='1' textcode='UNKNOWN'>
+        <desc xml:lang="en-US">Placeholder event.  Used for development only</desc>
+        <desc xml:lang="fr-CA">Exemple - seulement developpement</desc>
+    </event>
+</ils_events>
+"""
+# Copyright 2007 Dan Scott <dscott at laurentian.ca>
+#
+# 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.
+
+import basel10n
+import optparse
+import polib
+import re
+import sys
+import xml.sax
+import xml.sax.handler
+
+class ILSEvents(basel10n.BaseL10N):
+    """
+    This class provides methods for extracting translatable strings from
+    Evergreen's ils_events XML file, generating a translatable POT file,
+    reading translated PO files, and generating an updated ils_events.xml
+    file with the additional language strings.
+    """
+
+    def __init__(self):
+        self.pot = None
+        basel10n.BaseL10N.__init__(self)
+        self.definitions = []
+        self.locale = None
+
+    def get_strings(self, source):
+        """
+        Extracts translatable strings from the //desc[@lang='en-US'] attributes
+        in Evergreen's ils_events.xml file.
+        """
+        self.pothead()
+
+        locator = xml.sax.xmlreader.Locator()
+        parser = xml.sax.make_parser()
+        handler = ILSEventHandler()
+        handler.setDocumentLocator(locator)
+        parser.setContentHandler(handler)
+        parser.parse(source)
+
+        for entry in handler.events:
+            poe = polib.POEntry()
+            poe.occurrences = handler.events[entry]
+            poe.msgid = entry
+            self.pot.append(poe)
+
+    def create_events(self):
+        """
+        Creates an ILS events XML file based on a translated PO file.
+
+        Each PO entry has one or more file comment with the following structure:
+
+        #: numcode.textcode:lineno
+        """
+
+        event = """    <event code='%d' textcode='%s'>
+        <desc xml:lang='%s'>%s</desc>\n    </event>"""
+
+        # We should generate this in a real XML way, rather than faking it
+        # But we'll fake it for now
+        for entry in self.pot:
+            for name in entry.occurrences:
+                # regex name here
+                pat = re.compile(r'(\d+)\.(\w+)').match(name[0])
+                numcode = pat.group(1)
+                textcode = pat.group(2)
+
+                if entry.msgstr == '':
+                    # No translation available; use the en-US definition
+                    self.definitions.append(event % (int(numcode), textcode, self.locale, entry.msgid))
+                else:
+                    self.definitions.append(event % (int(numcode), textcode, self.locale, entry.msgstr))
+
+class ILSEventHandler(xml.sax.handler.ContentHandler):
+    """
+    Parses an ils_events.xml file to get at event[@code] attributes and
+    the contained desc[@lang='en-US'] elements.
+
+    Generates a list of events and their English descriptions.
+    """
+
+    def __init__(self):
+        xml.sax.handler.ContentHandler.__init__(self)
+        self.events = dict()
+        self.desc = u''
+        self.en_us_flag = False
+        self.numcode = None
+        self.textcode = None
+        self.locator = None
+
+    def setDocumentLocator(self, locator):
+        """
+        Override setDocumentLocator so we can track line numbers
+        """
+        self.locator = locator
+
+    def startElement(self, name, attributes):
+        """
+        Grab the event code attribute value for each class
+        or field element.
+        """
+        if name == 'event':
+            self.numcode = attributes['code']
+            self.textcode = attributes['textcode']
+        if name == 'desc' and attributes['xml:lang'] == 'en-US':
+            self.en_us_flag = True
+
+    def characters(self, content):
+        """
+        Build the ILS event description
+        """
+        if self.en_us_flag is True and content is not None:
+            self.desc += content
+
+    def endElement(self, name):
+        """
+        Generate the event with the closed description
+        """
+        if name == 'desc' and self.en_us_flag is True:
+            lineno = self.locator.getLineNumber()
+            event = "%d.%s" % (int(self.numcode), self.textcode)
+            if self.events.has_key(self.desc):
+                self.events[self.desc].append([str(event), lineno])
+            else:
+                self.events[self.desc] = [[str(event), lineno]]
+
+            # Reset event values
+            self.desc = u''
+            self.en_us_flag = False
+            self.numcode = None
+            self.textcode = None
+
+def main():
+    """
+    Determine what action to take
+    """
+    opts = optparse.OptionParser()
+    opts.add_option('-p', '--pot', action='store', \
+        help='Create a POT file from the specified ils_events.xml file', \
+        metavar='FILE')
+    opts.add_option('-c', '--create', action='store', \
+        help='Create an ils_events.xml file from a translated PO FILE', \
+        metavar='FILE')
+    opts.add_option('-l', '--locale', action='store', \
+        help='Locale of the ils_events.xml file that will be generated', \
+        metavar='FILE')
+    opts.add_option('-o', '--output', dest='outfile', \
+        help='Write output to FILE (defaults to STDOUT)', metavar='FILE')
+    (options, args) = opts.parse_args()
+
+    pot = ILSEvents()
+
+    # Generate a new POT file from the ils_events.xml file
+    if options.pot:
+        pot.get_strings(options.pot)
+        if options.outfile:
+            pot.savepot(options.outfile)
+        else:
+            sys.stdout.write(pot.pot.__str__())
+
+    # Generate an ils_events.xml file from a PO file
+    elif options.create:
+        if options.locale:
+            pot.locale = options.locale
+        else:
+            opts.error('Must specify an output locale to create an XML file')
+
+        head = """<?xml version="1.0" encoding="utf-8"?>
+<ils_events>
+        """
+        
+        tail = "</ils_events>"
+
+        pot.loadpo(options.create)
+        pot.create_events()
+        if options.outfile:
+            outfile = open(options.outfile, 'w')
+            outfile.write(head)
+            for event in pot.definitions: 
+                outfile.write(event + "\n")
+            outfile.write(tail)
+        else:
+            print(head)
+            for event in pot.definitions:
+                print(event)
+            print(tail)
+
+    # No options were recognized - print help and bail
+    else:
+        opts.print_help()
+
+if __name__ == '__main__':
+    main()



More information about the open-ils-commits mailing list