App-SpreadRevolutionaryDate

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

      for today's weather in Paris from meteo-paris.com website.

    "img_path"

      This option allows to add a local image on the spread message.

    "img_alt"

      This option specifies an alternative text to an image added on the
      spread message. If unset, the alternative text will be the name of
      the file specified in "img_path" or "img_url" options.

    "img_url"

      This option allows to add a remote image on the spread message.

    Finally, one word of localization: you don't need it, since Gemini will
    answer in the language you've used in your prompt. Or you can ask in
    your prompt to be answered in another language, like:

      prompt   FamousBirthday      = 'Which famous people have their birthday on $month_name $day? Give a list of up to 6 people, then after the list give the unformatted URL of the Wikipedia page of only one of them, no comments and no need for an i...

    The only place where you should be concerned by localization is when
    you define an introduction to be prepended to Gemini answer. Since it
    is a configured static string, it should be written in the desired
    language, like:

      intro    FamousBirthday      = 'FamousBirthday=Berühmte Personen, die am $day $month_name geboren wurden, im Guten wie im Schlechten:'

    Also, if you use some syntactic sugars relative to methods of DateTime
    module that are localizable, like month_name, you should use the
    "locale" option to have it translated in the desired language.

    And now you are ready to spread whatever your like, with just some
    configuration tweaks!

    Be aware that Gemini, like any other AI, has no concept of truth. It
    can only give formally probable answers, based on its training data. So
    do not ask somehing where truth matters… Also, all data you're sending
    to Gemini are assumed to not be private anymore and could be used by
    Google for any purpose! And finally, keep in mind that each request to
    Gemini AI consumes a huge amount of resources, which is detrimental to
    the environment.

INTERNATIONALIZATION AND LOCALIZATION

    Starting from version 0.11, this distribution uses the widespread
    internationalization and localization system gettext
    <https://en.wikipedia.org/wiki/Gettext>, commonly used for writing
    multilingual programs. See GNU gettext documentation
    <https://www.gnu.org/software/gettext/gettext.html> for details. From
    the point of view of a translator, this is rather simple.

    Translators can find a portable object template
    po/App-SpreadRevolutionaryDate.pot which includes all translatable
    strings used by spread-revolutionary-date (but not translations of
    days, months, feasts used in the French Revolutionary Calendar, see
    below). They can copy this template to a portable object file of their
    language and translate strings of this file. For example, a German
    translator would work on po/de.po. All strings to be translated are
    laid down in lines beginning with msgid keyword, and translations
    should go on the next line beginning with keyword msgstr. E.g.:

      msgid "Please, enter message to spread"

    A German translator would have to replace the next line:

     msgstr ""

    by:

     msgstr "Bitte geben Sie die Nachricht zu verbreiten ein"

    When the string to be translated includes some words in curly braces,
    these words are actually named variables and should be left as is in
    the translation. E.g.:

      msgid "or {abort} to abort"
      msgstr "oder {abort}, um abzubrechen"

    And that's it! As of version 0.11 of spread-revolutionary-date, there
    is only about a dozen of strings to translate, mainly for PromptUser
    message maker. But with the possibility to extend to other message
    makers, you may need more and more strings to be translated.

    Translating days, months and feasts used in the RevolutionaryDate
    message maker do not use the gettext system. Mainly because it uses
    DateTime::Calendar::FrenchRevolutionary which proposes French and
    English translations in dedicated Perl modules.
    spread-revolutionary-date keeps the same way for translating
    expressions used in the French revolutionary calendar, but, thanks to
    Moose::Role
    App::SpreadRevolutionaryDate::MsgMaker::RevolutionaryDate::Locale,
    translatable nominal groups have been isolated from other Perl code.
    Their translations lie in a consuming class in the
    App::SpreadRevolutionaryDate::MsgMaker::RevolutionaryDate::Locale::
    namespace for each translated language. These classes are named after
    the two-letter (ISO 639-1 <https://en.wikipedia.org/wiki/ISO_639-1>) or
    three-letter (ISO 639-2 <https://en.wikipedia.org/wiki/ISO_639-2> and
    ISO 639-3 <https://en.wikipedia.org/wiki/ISO_639-3>) lowercase
    abbreviation of the corresponding language. For example, a German
    translator would work on
    App::SpreadRevolutionaryDate::MsgMaker::RevolutionaryDate::Locale::de
    class.

    Just copy the French class (from
    lib/App/SpreadRevolutionaryDate/MsgMaker/RevolutionaryDate/Locale/fr.pm
    file) into the desired language, change the name of the class and
    replace every French string. E.g.: the names of the months should be
    replace in:

      has '+months' => (
        default => sub {[
          'Vendémiaire', 'Brumaire',  'Frimaire',
          'Nivôse',      'Pluviôse',  'Ventôse',
          'Germinal',    'Floréal',   'Prairial',
          'Messidor',    'Thermidor', 'Fructidor',
          'jour complémentaire',
        ]},
      );

    by names in German:

      has '+months' => (
        default => sub {[
          'Herbstmonat',    'Nebelmonat',  'Reifmonat',
          'Schneemonat',    'Regenmonat',  'Windmonat',
          'Keimmonat',      'Blütenmonat', 'Wiesenmonat',
          'Erntemonat',     'Hitzemonat',  'Fruchtmonat',
          'Ergänzungstage',
        ]},
      );

    Feasts include a special trick, because they can be used in sentences
    like this is feast name day or c'est le jour de la feast name.
    Depending on the language, it could then be prefixed or suffixed: in
    English it is suffixed by  day, whereas in French it is prefixed by
    jour de la . Prefixes are translated as an array of strings, while the



( run in 1.751 second using v1.01-cache-2.11-cpan-ceb78f64989 )