Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the CollectiveAccess support forum! Here the developers and community answer questions related to use of the software. Please include the following information in every new issue posted here:

  1. Version of the software that is used, along with browser and version

  2. If the issue pertains to Providence, Pawtucket or both

  3. What steps you’ve taken to try to resolve the issue

  4. Screenshots demonstrating the issue

  5. The relevant sections of your installation profile or configuration including the codes and settings defined for your local elements.


If your question pertains to data import or export, please also include:

  1. Data sample

  2. Your mapping


Answers may be delayed for posts that do not include sufficient information.

Adding facets using browse.conf : Add translations (Solved)

Hello again,

I'm currently adding facets to browse objects on collective acces and i'd like to be able to get the new facets translated as the default facets are. Where can i specify the translations or is it possible to use the metada labels ?

Thanks again !

John

Comments

  • If you mean the labels that you put in browse.conf, when you specify label_singular and label_plural, use the _("") syntax that you see in the default facets, add the strings you put in between the "" and their desired translations to the usual app/locale/xx_XX/message.po file (where xx_XX is you locale) and follow the usual procedure for .po/.mo refreshes.
  • Thanks ! Will do !
  • Hi. I did this way, but cannot get facet terms translated on pawtucket2.

    Any suggestion?
  • Hi gbenigni,

    Once you've wrapped your browse labels in browse.conf  as yelto mentioned, you must scan and update the messages.po file - have you done this?


  • I added the _( value on source search string, updated the but Poedit does not recognize browse.conf _("xxx") strings.

    Probably I am doing it wrong.
  • Make sure you are including those files in the scan path for Poedit, and that the extractor is configured to look for _() in .conf files. Something like this for the extractor:

    ‪xgettext --language=Lua --add-comments=TRANSLATORS: --force-po -o %o %C %K %F

    (Note that using Lua as the target language seems to make POEdit happy)
  • For future use of this, don't forget to empty cache and tmp files from CA.Otherwise the new translations won't be displayed.
    Thanks for the help everyone !

    John
  • Hi Seth. I'm coming back to this issue.
    I configured Poedit this way:
    I created this extractor
    image

    and I am using the following translation keys:

    image
    But I still cannot get translated the browse.conf file.
    I attach it's beginning here into for you to check it.

    Could you help me?

    Thank you,

    Giovanni

    ---------------- browse.conf ---------------
    #
    # Browse configuration
    #

    # number of seconds to keep cached browses around
    # set to 0 to disable caching
    cache_timeout = 0

    # Configuration for object browse
    ca_objects = {
    facets = {
    other_registrar = {
    type = attribute,
    element_code = other_inventory,
    group_mode = alphabetical,
    label_singular = _("other registrar"),
    label_plural = _("other registrars")
    },
    annex_type = {
    type = attribute,
    element_code = annex_type,
    group_mode = alphabetical,
    label_singular = _("annex type"),
    label_plural = _("annex types")
    },
    current_location = {
    type = location,
    restrict_to_types = [],
    # show_all_for_no_criteria_browse = 1,
    group_mode = none,

    collapse = {
    ca_loans = On loan,
    ca_occurrences/event = On exhibition,
    ca_movements/movement = In transit,
    ca_movements/conservation = On conservation,
    ca_storage_locations = On site,
    ca_objects = On site
    },
    display = {
    ca_storage_locations = {
    related = { template = ^ca_storage_locations.hierarchy.preferred_labels.name%delimiter=_➔_ }
    }, 
    ca_movements = {
    movement = { template = ^ca_movements.preferred_labels.name },
    conservation = { template = ^ca_storage_locations.hierarchy.preferred_labels.name%delimiter=_➔_ }
    }, 
    ca_occurrences = {
    event = { template = ^ca_occurrences.preferred_labels.name (event)}
    },
    ca_loans = {
    out = { template = ^ca_loans.loan_out_date}
    },
    },
    description = Object current location
    include_none_option = On Site,
    label_singular = _("current location"),
    label_plural = _("current location")

    },
    539 x 636 - 39K
    507 x 435 - 17K
  • Use the .po file in the release rather than your own.
Sign In or Register to comment.