Chirpy!

Latest Version: 0.3
Released: 2007-02-09

Chirpy! 0.2 API Documentation

<<
Chirpy::Locale

NAME

Chirpy::Locale - Represents a locale

SYNOPSIS

 $locale = new Chirpy::Locale('/path/to/locale.ini');

 $value = $locale->get_string($name);
 $value = $locale->get_string($name, @params);

 $target_version = $locale->get_target_version();
 $full_name = $locale->get_full_name();
 $version = $locale->get_version();
 $author_hash_ref = $locale->get_author_information();

CREATING LOCALES

Locales are INI files with two sections, one with information about the locale and one with the localized strings. It is recommended that you use the language code as the filename, e.g. it.ini for Italian or fr-CA.ini for French/Canada.

Information Section

Information about the locale is stored in the INI file's properties section. Version 0.2 locales use the following values for storing information about the locale:

chirpy_version

The version of Chirpy! that the locale was made for, so 0.2 for this release.

full_name

The full name of the locale. Usually, this is the name of the locale language.

version

The version number of the locale. You can use any version number scheme you like, but make sure people can distinguish between versions easily.

author_name

Your full name.

author_email

The e-mail address where people can contact you.

author_uri

The URL to your homepage, if any.

Strings Section

The localized strings are stored in the INI file's strings section. Version 0.2 locales must define the strings listed below. For examples, please consult en-US.ini, the U.S. English locale bundled with Chirpy! by default.

Note that locales may contain extra strings which are specific to a user interface class. These must be prepended by the name of the class and a dot. The default Chirpy::UI::WebApp class requires a few strings already, which are listed under Locale Strings in its documentation.

error_title

Title used for errors.

quote_browser

Translation of Quote Browser, for the title of that section or links to it.

random_quotes

Translation of Random Quotes, for the title of that section or links to it.

view_quote

Translation of View Quote, for the title of that section or links to it.

top_quotes

Translation of Top Quotes, for the title of that section or links to it.

bottom_quotes

Translation of Bottom Quotes, for the title of that section or links to it.

quotes_of_the_week

Translation of Quotes of the Week, for the title of that section or links to it.

search_for_quotes

Translation of Search for Quotes, for the title of that section or links to it.

administration

Translation of Administration, for the title of that section or links to it.

edit_quote

Translation of Edit Quote, for the title of that section or links to it.

remove_quote

Translation of Remove Quote, for the title of that section or links to it.

welcome

Generic translation of the string Welcome.

latest_news

Translation of Latest News, for the title of the list of recent news items.

unknown_action

Text describing that the action the user requested is unknown, for error messages.

no_quotes

Text describing that there aren't any quotes to display.

quote_browser_description

Brief description of what the quote browser does, for tooltips and such.

quote_browser_short_title

Abbreviated version of Quote Browser, for use in compact menus.

random_quotes_description

Brief description of what the list of random quotes does, for tooltips and such.

random_quotes_short_title

Abbreviated version of Random Quotes, for use in compact menus.

top_quotes_description

Brief description of what the list of top quotes does, for tooltips and such.

top_quotes_short_title

Abbreviated version of Top Quotes, for use in compact menus.

bottom_quotes_description

Brief description of what the list of bottom quotes does, for tooltips and such.

bottom_quotes_short_title

Abbreviated version of Bottom Quotes, for use in compact menus.

quotes_of_the_week_description

Brief description of what the list of quotes of the week does, for tooltips and such.

quotes_of_the_week_short_title

Abbreviated version of Quotes of the Week, for use in compact menus.

quote_search_description

Brief description of what the quote search does, for tooltips and such.

quote_search_short_title

Abbreviated version of Quote Search, for use in compact menus.

submit_quote_description

Brief description of what the quote submission interface does, for tooltips and such.

submit_quote_short_title

Abbreviated version of Submit Quote, for use in compact menus.

administration_description

Brief description of what the administration interface does, for tooltips and such.

administration_short_title

Abbreviated version of Administration, for use in compact menus.

login_description

Brief description of what the login interface does, for tooltips and such.

login_short_title

Abbreviated version of Log In, for use in compact menus.

logout_description

Brief description of what the logout interface does, for tooltips and such.

logout_short_title

Abbreviated version of Log Out, for use in compact menus.

quote_report_description

Brief description of what reporting quotes is, for tooltips and such.

quote_rating_up_description

Brief description of what increasing a quote's rating is, for tooltips and such.

quote_rating_down_description

Brief description of what decreasing a quote's rating is, for tooltips and such.

quote_rating_description

Brief description of what the quote's rating is, for tooltips and such.

quote_date_description

Brief description of what the date when the quote was submitted is, for tooltips and such.

quote_edit_description

Brief description of what editing the quote does, for tooltips and such.

quote_remove_description

Brief description of what removing the quote does, for tooltips and such.

quote_notes_title

Title of the notes section in the quote list, followed by a colon.

quote_tags_title

Title of the tags section in the quote list, followed by a colon.

no_tagged_quotes

Message displayed instead of the tag cloud when no quotes have been tagged.

tag_link_description

Description text for the link to the list of quotes with the current tag. %1% is replaced with the tag.

search_query_title

Title of the query field on the search interface, followed by a colon.

search_button_label

Label text for the button that initiates searches.

search_results

Translation of Search Results, for the title of that section or links to it.

submit_quote

Translation of Submit Quote, for the title of that section or links to it.

submission_title

Directions telling the user to enter his quote in the input field that follows the text.

notes_title

Directions telling the user to optionally enter notes about the quote in the input field that follows the text.

submit_button_label

Label text for the button that submits the newly entered quote.

submit_button_label_no_approval

Label text for the button that submits the newly entered quote, suggesting that the quote will be immediately added without approval, since the user has that privilege.

quote_submitted

Title for the interface stating that the quote has been submitted.

quote_submitted_no_approval

Title for the interface stating that the quote has been submitted and approval is not necessary. Something like Quote Added is appropriate.

quote_submission_thanks

Message thanking the user for the submitted quote and explaining that it will now be reviewed before it is added.

quote_submission_thanks_no_approval

Message thanking the user for the submitted quote and explaining that it has been added without the need for approval.

approve_quotes

Translation of Approve Quotes, for titles and labels in the administrative interface.

flagged_quotes

Translation of Flagged Quotes, for titles and labels in the administrative interface.

manage_news

Translation of Manage News, for titles and labels in the administrative interface.

manage_quotes

Translation of Manage Quotes, for titles and labels in the administrative interface.

add_news

Translation of Add News, for titles and labels in the administrative interface.

edit_news

Translation of Edit News, for titles and labels in the administrative interface.

remove_news

Translation of Remove News, for titles and labels in the administrative interface.

manage_accounts

Translation of Manage Accounts, for titles and labels in the administrative interface.

no_unapproved_quotes

Message describing that there are currently no quotes waiting for approval.

no_flagged_quotes

Message describing that there are currently no quotes that are flagged.

quote_rating_up_short_title

Short label text for the link that increases the quote's rating, e.g. Up.

quote_rating_down_short_title

Short label text for the link that decreases the quote's rating, e.g. Down.

report_quote_short_title

Short label text for the link that reports the quote, e.g. Report.

edit

Generic translation of Edit, which can be used for links to edit quotes, news items, etc.

remove

Generic translation of Remove, which can be used for links to remove quotes, news items, etc.

unflag

Text for the link that removes the report for the quote.

flagged

Text that indicates that the quote has been reported in the past.

quote_removal_confirmation

Question that asks the user if he is sure that he would like to remove the quote.

news_removal_confirmation

Question that asks the user if he is sure that he would like to remove the news item.

quote_rating_increased

Title for the interface stating that the quote's rating has been increased.

quote_rating_decreased

Title for the interface stating that the quote's rating has been decreased.

quote_rating_thanks

Message confirming that the user's vote has been processed, used for both positive and negative votes.

quote_reported

Title for the interface stating that the quote has been reported.

quote_report_thanks

Message confirming that the quote has been reported.

quote_already_rated

Error message stating that the user can only rate the same quote once per session and that he has already rated the selected quote.

quote_rating_limit_exceeded

Error message stating that the user has exceeded the maximum number of votes allowed. %1% is replaced with the maximum number of votes, %2% with the number of seconds in the time frame for that maximum.

login_title

Title of the login interface.

invalid_login_title

Title of the interface stating that logging in has failed.

username_title

Title of the field where the user inputs his username, followed by a colon.

password_title

Title of the field where the user inputs his password, followed by a colon.

login_button_label

Label of the button that submits the login information the user has entered.

invalid_login_instructions

Error message stating that the credentials the user has entered are incorrect, with the additional information that the password is case-sensitive, while the username is not.

logged_in_as

Message stating that the user is logged in. %1% is replaced with the user's username, %2% with his user level.

change_password

Translation of Change Password, for titles and labels in the administrative interface.

error

Generic translation of the string Error.

processing

Generic translation of the string Processing, used for operations that may take a while.

timed_out

Generic translation of the string Timed Out, used for operations that have failed to complete.

no_search_results

Title of the interface stating that there are no search results.

no_search_results_text

Message explaining that none of the quotes match the search query.

quote_not_found

Title of the interface stating that the requested quote was not found.

quote_not_found_text

Message explaining that the quote ID the user has provided does not exist.

rated_quote_not_found_text

Message explaining that the quote the user is trying to rate does not exist.

reported_quote_not_found_text

Message explaining that the quote the user is trying to report does not exist.

user_level_3

Title of the user level with numeric ID 3.

user_level_6

Title of the user level with numeric ID 6.

user_level_9

Title of the user level with numeric ID 9.

password_changed

Title of the interface stating that the user's password has been changed.

password_changed_text

Message stating that the user's password has been changed, reminding him to keep it in a safe place.

current_password_title

Title of the field where the user inputs his current password, followed by a colon.

new_password_title

Title of the field where the user inputs his new password, followed by a colon.

repeat_new_password_title

Title of the field where the user inputs his new password again for verification, followed by a colon.

change_password_button_label

Label of the button that submits the user's new password.

change_password_current_password_invalid_text

Error message stating that the user failed to enter his current password.

change_password_new_password_invalid_text

Error message stating that the new password the user has entered is invalid.

change_password_passwords_differ_text

Error message stating that the new password the user has entered does not match the verification entry.

do_nothing

Generic translation of the string Do Nothing, useful for the quote approval and report review interfaces.

approve_unapproved_quote

Text for the option that approves the new quote in the approval interface.

discard_unapproved_quote

Text for the option that removes the new quote in the approval interface.

update_database

Generic translation of the string Update Database, useful for the quote approval and report review interfaces.

reset_form

Generic translation of the string Reset Form, useful for various form-based interfaces.

keep_flagged_quote

Text for the option that keeps the flagged quote in the report review interface.

remove_flagged_quote

Text for the option that removes the flagged quote in the report review interface.

quote_removed

Text confirming that the selected quote has been removed.

quote_to_edit_not_found

Error message stating that the quote the user tried to edit could not be found.

quote_to_remove_not_found

Error message stating that the quote the user tried to remove could not be found.

quote_modified

Message confirming that the user's modifications to the quote have been saved.

quote_id_title

Title text for a quote ID input field, followed by a colon.

save_quote

Label text for the button that saves modifications to the quote.

go

Generic translation of the string Go.

news_item_added

Message confirming that the submitted news item has been added.

news_item_modified

Message confirming that the modifications to the news item have been saved.

news_item_to_edit_not_found

Error message stating that the news item the user tried to edit was not found.

news_item_removed

Message confirming that the news item has been removed.

news_item_to_remove_not_found

Error message stating that the news item the user tried to remove was not found.

new_news_item_title

Title text for the new news item input field, followed by a colon.

add_news_item

Label text for the button that adds the newly entered news item.

news_poster_title

Title text for the poster selection field upon modification of a news item, followed by a colon.

save_news_item

Label text for the button that saves modifications to a news item.

account_to_modify_not_found

Error message stating that the account the user tried to modify could not be found.

account_to_remove_not_found

Error message stating that the account the user tried to remove could not be found.

last_owner_account_removal_error

Error message stating that there must be at least one account with the maximum user level, and therefore, the selected account cannot be removed.

modified_account_information_required

Error message stating that the user failed to enter any updated account information for the selected account.

invalid_username

Error message stating the username the user has entered is invalid.

username_exists

Error message stating the username the user has entered already exists.

invalid_password

Error message stating the password the user has entered is invalid.

different_passwords

Error message stating the password and confirmation the user has entered are not equal.

invalid_user_level

Error message stating the user level the user has selected is invalid.

account_removed

Message confirming that the account has been removed.

account_modified

Message confirming that the account has been modified.

account_created

Message confirming that the account has been created.

new_account

Generic translation of the string New Account.

new_username_title

Title for the field where the user enters the username for the account he is adding, followed by a colon.

new_password_title

Title for the field where the user enters the password for the account he is adding, followed by a colon.

repeat_new_password_title

Title for the field where the user enters the password for the account he is adding again for confirmation, followed by a colon.

new_user_level_title

Title for the field where the user selects the user level for the account he is adding, followed by a colon.

update_accounts

Label for the button that processes changes to the account overview.

remove_account

Label for the button that removes the selected account.

no_change

Generic translation of the string No Change.

unknown

Generic translation of the string Unknown.

account_removal_confirmation

Question confirming that the user is sure he wishes to remove the selected account.

insufficient_administrative_privileges

Error message displayed when the user attempts to access an administration interface he is not allowed to use.

update_available

Title for the message indicating that a new version of Chirpy! is available.

update_available_text

Text giving basic information about a Chirpy! update. %1% is replaced with the version number %2% with the release date.

update_link_text

Text for a link to an available update. Usually something along the lines of "Click here for more information."

update_check_failed

Title for the message indicating that checking for updates has failed.

update_check_failed_text

Message explaining that Chirpy! failed to check for updates, and indicating that an error report follows.

TODO

The list of strings needs some organization and some of the identifier names should probably be revised. Sorry for the inconvenience.

AUTHOR

Tim De Pauw <ceetee@users.sourceforge.net>

SEE ALSO

Chirpy::Util::IniFile, Chirpy, http://chirpy.sourceforge.net/

COPYRIGHT

Copyright 2005-2006 Tim De Pauw. All rights reserved.

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.