# You must use a tab-size of 4 spaces to edit this file.
---
zenario__languages:
    panels:
        phrases:
            title: Phrases
            php: true
            db_items:
                table: >
                    [[DB_PREFIX]]visitor_phrases AS vp
                    INNER JOIN [[DB_PREFIX]]languages AS l
                    ON vp.language_id = l.id
                id_column: vp.id
                custom_where_statement_if_no_refiner: |
                    WHERE vp.language_id = [[FOCUSED_LANGUAGE_ID]]
            refiners:
                modules_phrases:
                    table_join: |
                        INNER JOIN [[DB_PREFIX]]modules AS m
                        ON m.id = [[REFINER__MODULES_PHRASES]]
                    sql: vp.module_class_name = m.class_name
                category_public_name:
                    sql: |
                        vp.code = '_CATEGORY_[[REFINER__CATEGORY_PUBLIC_NAME]]'
                        AND vp.module_class_name = 'zenario_common_features'
                group_public_name:
                    sql: |
                        vp.code = '_GROUP_[[REFINER__GROUP_PUBLIC_NAME]]'
                        AND vp.module_class_name = 'zenario_common_features'
            columns:
                code:
                    title: Phrase code
                    searchable: true
                    db_column: vp.code
                    show_by_default: true
                    width: large
                is_code:
                    title: Is code
                    db_column: SUBSTR(vp.code, 1, 1) = '_'
                    format: yes_or_no
                    yes_phrase: Code-based
                    no_phrase: Text-based
                    show_by_default: false
                    width: xsmall
                is_html:
                    title: Is HTML
                    db_column: vp.is_html
                    format: yes_or_no
                    yes_phrase: HTML
                    no_phrase: Plain text
                    show_by_default: false
                    width: small
                module_name:
                    title: Source module name
                    db_column: vp.module_class_name
                    format: module_class_name
                    show_by_default: true
                    width: large
                module_class_name:
                    db_column: vp.module_class_name
                seen_in_visitor_mode:
                    title: Seen in visitor mode
                    db_column: vp.seen_in_visitor_mode
                    format: yes_or_no
                    yes_phrase: Seen
                    no_phrase: Unseen
                    show_by_default: false
                    width: small
                seen_at:
                    db_column: |
                        IF (vp.seen_at_content_id IS NULL, NULL, CONCAT(vp.seen_at_content_type, '_', vp.seen_at_content_id))
                    title: Seen at
                    show_by_default: true
                    width: large
                    item_link: content_item_or_url
                first_seen_by_visitor:
                    title: First seen in visitor mode
                    db_column: vp.first_seen_by_visitor
                    format: date
                    show_by_default: true
                    values:
                        unknown: Unknown
                    #width: small
                #modified_date:
                #    title: Last modified by admin
                #    db_column: vp.modified_date
                #    format: date
                #    show_by_default: true
                #    #width: small
            default_sort_column: code
            item:
                name: Phrase
                names: Phrases
                css_class: language
            collection_buttons:
                help:
                    label: Help
                    help:
                        message: |
                            This panel lists all of the phrases that exist on your site. If your site is multilingual, then a phrase's  translation will display on the page in the corresponding language.
                            
                            A phrase cannot be created in organizer, for a phrase to be added it must be found in a plugin's framework or created as a plugin's setting. In both cases, the phrase needs to be viewed by a visitor to be added to this panel.
                reimport_phrases:
                    label: Re-import phrases from config files
                    hide_in_select_mode: Yes
                    ajax:
                        confirm:
                            message: 
                            button_message: Re-import
                            cancel_button_message: Cancel
                            message_type: warning
                        request:
                            reimport_phrases: 1
                export_phrases_dropdown:
                    label: Export phrases
                    multiple_select: Yes
                    hide_when_children_are_not_visible: Yes
                import_phrases:
                    priv: _PRIV_MANAGE_LANGUAGE_PHRASE
                    label: Import phrases
                    tooltip: |
                        Import phrases from an Excel or CSV file.
                        
                        The Excel or CSV file that you provide contain the ISO code for the language that you are trying to update, and must be in the correct format.
                    upload:
                        fileExt: '*.csv;*.ods;*.xls;*.xlsx'
                        fileDesc: CSV, Excel or OpenDocument spreadsheet files
                        request:
                            import_phrases: "1"
            
            item_buttons:
                edit_dropdown:
                    label: Edit phrase...
                    multiple_select: Yes
                    hide_when_children_are_not_visible: Yes
                edit:
                    ord: 999
                    priv: _PRIV_VIEW_LANGUAGE
                    parent: edit_dropdown
                    label: Edit phrase (all languages)
                    admin_box:
                        path: zenario_phrase
                merge:
                    priv: _PRIV_MANAGE_LANGUAGE_PHRASE
                    label: Merge
                    multiple_select: true
                    multiple_select_only: true
                    without_columns_set:
                        is_code: true
                    ajax:
                        confirm:
                            html: true
                            message: 'Are you sure you wish to merge the selected phrases?'
                            button_message: Merge
                            cancel_button_message: Cancel
                            message_type: warning
                        request:
                            merge_phrases: 1
                
                mark_as_unseen_plain_text:
                    priv: _PRIV_MANAGE_LANGUAGE_PHRASE
                    label: Mark as unseen
                    multiple_select: true
                    visible_if_for_all_selected_items: |
                        !item.is_html
                    visible_if_for_any_selected_items: |
                        item.seen_in_visitor_mode
                    ajax:
                        confirm:
                            message: |
                                Are you sure you wish to clear the record of where the phrase "[[code]]" was first seen?
                            multiple_select_message: |
                                Are you sure you wish to clear the record of where the [[item_count]] selected phrases were first seen?
                            button_message: Mark as unseen
                            cancel_button_message: Cancel
                            message_type: warning
                        request:
                            mark_as_unseen: 1
                mark_as_unseen_html:
                    priv: _PRIV_MANAGE_LANGUAGE_PHRASE
                    label: Mark as unseen
                    multiple_select: true
                    visible_if_for_any_selected_items: |
                        item.is_html && item.seen_in_visitor_mode
                    ajax:
                        confirm:
                            message: |
                                Are you sure you wish to clear the record of where the selected phrase was first seen?
                            multiple_select_message: |
                                Are you sure you wish to clear the record of where the [[item_count]] selected phrases were first seen?
                            button_message: Mark as unseen
                            cancel_button_message: Cancel
                            message_type: warning
                        request:
                            mark_as_unseen: 1
                
                delete_plain_text:
                    priv: _PRIV_MANAGE_LANGUAGE_PHRASE
                    label: Delete
                    multiple_select: true
                    visible_if_for_all_selected_items: |
                        !item.is_code && !item.is_html
                    ajax:
                        confirm:
                            message: |
                                Are you sure you wish to delete the translations of the phrase "[[code]]"?
                                
                                This will not delete any plugin settings or customised phrases.
                            multiple_select_message: |
                                Are you sure you wish to delete the translations of the [[item_count]] selected phrases?
                                
                                This will not delete any plugin settings or customised phrases.
                            button_message: Delete
                            cancel_button_message: Cancel
                            message_type: warning
                        request:
                            delete_phrase: 1
                delete_html:
                    priv: _PRIV_MANAGE_LANGUAGE_PHRASE
                    label: Delete
                    multiple_select: true
                    visible_if_for_all_selected_items: |
                        !item.is_code
                    visible_if_for_any_selected_items: |
                        item.is_html
                    ajax:
                        confirm:
                            message: |
                                Are you sure you wish to delete the translations of the selected phrase?
                                
                                This will not delete any plugin settings or customised phrases.
                            multiple_select_message: |
                                Are you sure you wish to delete the translations of the [[item_count]] selected phrases?
                                
                                This will not delete any plugin settings or customised phrases.
                            button_message: Delete
                            cancel_button_message: Cancel
                            message_type: warning
                        request:
                            delete_phrase: 1
