Okay
  Public Ticket #2123906
Change Name for "Projects"
Open

Comments

  • Mark D Gillette started the conversation

    How can I change the name for "Projects" to something different such as "Work" or "Jobs" or whatever?

    Thanks.

  •  283
    Abhishek replied

    Hello,

    You need to replace instances of Project to your liking in file

    /plugins/woffice-core/extensions/woffice-projects/class-fw-extension-woffice-projects.php

    function name action_register_post_type() only the label argument

    $labels = array(   'name' => __( 'Projects', 'woffice' ),
                       'singular_name' => __( 'Project', 'woffice' ),
                       'menu_name' => __( 'Projects', 'woffice' ),
                       'name_admin_bar'     => __( 'Project', 'woffice' ),
                       'add_new'            => __( 'Add New', 'woffice' ),
                       'new_item'           => __( 'Project', 'woffice' ),
                       'edit_item'          => __( 'Edit Project', 'woffice' ),
                       'view_item'          => __( 'View Project', 'woffice' ),
                       'all_items'          => __( 'All Projects', 'woffice' ),
                       'search_items'       => __( 'Search Project', 'woffice' ),
                       'not_found'          => __( 'No Project found.', 'woffice' ),
                       'not_found_in_trash' => __( 'No Project found in Trash.', 'woffice' )
    );

    Let me know if you need further detail

    Kind Regards,

    Abhishek 

    Want feedback on your awesome Intranet? Get yourself a beta access on Feedier.com.

    Keen on Woffice ? Please take a few seconds to give us a 5-star review on ThemeForest.

  • Mark D Gillette replied

    Thanks.

    How do I put it in child theme so I don't have to change the core file?

    I appreciate your help.

  •  283
    Abhishek replied

    Hello,

    You can try adding this in you child theme,

    add_filter('woffice_post_type_project_labels', function($labels) => {
        return array(            
                'name'               => __( 'Projects', 'woffice' ),
                'singular_name'      => __( 'Project', 'woffice' ),
                'menu_name'          => __( 'Projects', 'woffice' ),
                'name_admin_bar'     => __( 'Project', 'woffice' ),
                'add_new'            => __( 'Add New', 'woffice' ),
                'new_item'           => __( 'Project', 'woffice' ),
                'edit_item'          => __( 'Edit Project', 'woffice' ),
                'view_item'          => __( 'View Project', 'woffice' ),
                'all_items'          => __( 'All Projects', 'woffice' ),
                'search_items'       => __( 'Search Project', 'woffice' ),
                'not_found'          => __( 'No Project found.', 'woffice' ),
                'not_found_in_trash' => __( 'No Project found in Trash.', 'woffice' )
            );
    });

    And rename here whatever you like.

    Kind Regards,

    Abhishek 

    Want feedback on your awesome Intranet? Get yourself a beta access on Feedier.com.

    Keen on Woffice ? Please take a few seconds to give us a 5-star review on ThemeForest.

  • Mark D Gillette replied

    I appreciate it.  Tried but there was an error somewhere in the script.

  •  283
    Abhishek replied

    Hey sorry for the confusion here,

    It's all managed by /languages you can rename it using .po file using poedit 

    https://alkaweb.atlassian.net/wiki/spaces/WOF/pages/2228238/Languages

    Let me know if you need more details

    Kind Regards,

    Abhishek 

    Want feedback on your awesome Intranet? Get yourself a beta access on Feedier.com.

    Keen on Woffice ? Please take a few seconds to give us a 5-star review on ThemeForest.

  • Mark D Gillette replied

    Okay.  Where is that file and can i add that the child theme so it's not changed by an update?

  • Mark D Gillette replied

    Is this correct (pictured)? I created new .po for en_us. I added a translation for the change. I uploaded, but still not changing.

    Attached files:  2019-09-05_1933.png

  •  283
    Abhishek replied

    Hello,

    The file should be name en_US.po  and after saving the translations it should generate a en_US.mo

    these two files should be added in /woffice/languages folder.

    Have a nice daysmile.png

    Kind Regards,

    Abhishek 

    Want feedback on your awesome Intranet? Get yourself a beta access on Feedier.com.

    Keen on Woffice ? Please take a few seconds to give us a 5-star review on ThemeForest.

  • Mark D Gillette replied

    Thanks. Which gets changed or modified for what I'm looking for?

  •  283
    Abhishek replied

    Search for strings named "Projects" and and replace theme with whatever you like.

    Have a nice daysmile.png

    Kind Regards,

    Abhishek 

    Want feedback on your awesome Intranet? Get yourself a beta access on Feedier.com.

    Keen on Woffice ? Please take a few seconds to give us a 5-star review on ThemeForest.

  • Mark D Gillette replied

    I understand but do I change both.mo and.po

  •  283
    Abhishek replied

    Hello,

    Yes both of them should be renamed as en_US, you should make all the changes in .po file and then generate 

    a .mo file from FILE -> Compile to Mo option

    Attached files:  Screenshot 2019-09-09 at 6.27.24 PM.png

    Kind Regards,

    Abhishek 

    Want feedback on your awesome Intranet? Get yourself a beta access on Feedier.com.

    Keen on Woffice ? Please take a few seconds to give us a 5-star review on ThemeForest.

  • Mark D Gillette replied

    Thx. Will try.

  • Mark D Gillette replied

    Does this look right?  It doesn't seem to be changing anything.

    Attached files:  2019-09-09_1705.png

  •  283
    Abhishek replied

    Yes this is correct, however you need to translate all the strings named Projects,

    Please refer 

    https://www.youtube.com/watch?v=uSGMiXEEsvI

    Just ignore the settings part

    Kind Regards,

    Abhishek 

    Want feedback on your awesome Intranet? Get yourself a beta access on Feedier.com.

    Keen on Woffice ? Please take a few seconds to give us a 5-star review on ThemeForest.