Jump to content

How to find all translatable files (Mac/Linux)


Nico Knoll
 Share

Recommended Posts

It's really easy with "Terminal" to get all the translatable files. Just open the root dir of your ProcessWire installation in the terminal ("cd /YOUR/DIR/PATH/" or drag'n'drop the folder onto the terminal.app icon).

Then entering the following line:

grep -lr '__(\|$this->_(' *

  

grep search command

-l only show filenames

-r recursive

'__(\|$this->_(' search term with OR ( \| ) condition

the folder you want to start the search in. because we are already in the folder because of "cd" we can use the asteric

My result on PW 2.4.9:

wire/core/AdminTheme.php
wire/core/Field.php
wire/core/Fields.php
wire/core/FieldSelectorInfo.php
wire/core/Fieldtype.php
wire/core/FieldtypeMulti.php
wire/core/Functions.php
wire/core/Inputfield.php
wire/core/InputfieldWrapper.php
wire/core/LanguageFunctions.php
wire/core/Modules.php
wire/core/Pagefile.php
wire/core/Pageimage.php
wire/core/Pages.php
wire/core/Password.php
wire/core/Session.php
wire/core/SessionCSRF.php
wire/core/Wire.php
wire/core/WireCache.php
wire/core/WireHttp.php
wire/core/WireUpload.php
wire/modules/AdminTheme/AdminThemeDefault/AdminThemeDefault.module
wire/modules/AdminTheme/AdminThemeDefault/AdminThemeDefaultHelpers.php
wire/modules/AdminTheme/AdminThemeDefault/default.php
wire/modules/Fieldtype/FieldtypeComments/CommentFilterAkismet.module
wire/modules/Fieldtype/FieldtypeComments/CommentForm.php
wire/modules/Fieldtype/FieldtypeComments/CommentList.php
wire/modules/Fieldtype/FieldtypeComments/FieldtypeComments.module
wire/modules/Fieldtype/FieldtypeComments/InputfieldCommentsAdmin.module
wire/modules/Fieldtype/FieldtypeDatetime.module
wire/modules/Fieldtype/FieldtypeFile.module
wire/modules/Fieldtype/FieldtypeFloat.module
wire/modules/Fieldtype/FieldtypeModule.module
wire/modules/Fieldtype/FieldtypePage.module
wire/modules/Fieldtype/FieldtypePageTable.module
wire/modules/Fieldtype/FieldtypeRepeater/FieldtypeRepeater.module
wire/modules/Fieldtype/FieldtypeRepeater/InputfieldRepeater.module
wire/modules/Fieldtype/FieldtypeSelector.module
wire/modules/Fieldtype/FieldtypeText.module
wire/modules/Fieldtype/FieldtypeTextarea.module
wire/modules/Fieldtype/FieldtypeURL.module
wire/modules/Inputfield/InputfieldAsmSelect/InputfieldAsmSelect.module
wire/modules/Inputfield/InputfieldButton.module
wire/modules/Inputfield/InputfieldCheckbox.module
wire/modules/Inputfield/InputfieldCheckboxes/InputfieldCheckboxes.module
wire/modules/Inputfield/InputfieldCKEditor/InputfieldCKEditor.module
wire/modules/Inputfield/InputfieldDatetime/InputfieldDatetime.module
wire/modules/Inputfield/InputfieldEmail.module
wire/modules/Inputfield/InputfieldFieldset.module
wire/modules/Inputfield/InputfieldFile/InputfieldFile.module
wire/modules/Inputfield/InputfieldFloat.module
wire/modules/Inputfield/InputfieldForm.module
wire/modules/Inputfield/InputfieldHidden.module
wire/modules/Inputfield/InputfieldImage/InputfieldImage.module
wire/modules/Inputfield/InputfieldInteger.module
wire/modules/Inputfield/InputfieldMarkup.module
wire/modules/Inputfield/InputfieldName.module
wire/modules/Inputfield/InputfieldPage/InputfieldPage.module
wire/modules/Inputfield/InputfieldPageAutocomplete/InputfieldPageAutocomplete.module
wire/modules/Inputfield/InputfieldPageListSelect/InputfieldPageListSelect.module
wire/modules/Inputfield/InputfieldPageListSelect/InputfieldPageListSelectMultiple.module
wire/modules/Inputfield/InputfieldPageName/InputfieldPageName.module
wire/modules/Inputfield/InputfieldPageTable/InputfieldPageTable.module
wire/modules/Inputfield/InputfieldPageTable/InputfieldPageTableAjax.php
wire/modules/Inputfield/InputfieldPageTitle/InputfieldPageTitle.module
wire/modules/Inputfield/InputfieldPassword.module
wire/modules/Inputfield/InputfieldRadios/InputfieldRadios.module
wire/modules/Inputfield/InputfieldSelect.module
wire/modules/Inputfield/InputfieldSelectMultiple.module
wire/modules/Inputfield/InputfieldSelector/InputfieldSelector.module
wire/modules/Inputfield/InputfieldSubmit/InputfieldSubmit.module
wire/modules/Inputfield/InputfieldText.module
wire/modules/Inputfield/InputfieldTextarea.module
wire/modules/Inputfield/InputfieldURL.module
wire/modules/Jquery/JqueryWireTabs/JqueryWireTabs.module
wire/modules/LanguageSupport/LanguageParser.php
wire/modules/LanguageSupport/LanguageSupport.module
wire/modules/LanguageSupport/LanguageSupportFields.module
wire/modules/LanguageSupport/LanguageSupportPageNames.module
wire/modules/LanguageSupport/LanguageTabs.module
wire/modules/LanguageSupport/ProcessLanguage.module
wire/modules/LanguageSupport/ProcessLanguageTranslator.module
wire/modules/Markup/MarkupPageFields.module
wire/modules/Markup/MarkupPagerNav/MarkupPagerNav.module
wire/modules/PageRender.module
wire/modules/Process/ProcessField/ProcessField.module
wire/modules/Process/ProcessForgotPassword.module
wire/modules/Process/ProcessHome.module
wire/modules/Process/ProcessList.module
wire/modules/Process/ProcessLogin/ProcessLogin.module
wire/modules/Process/ProcessModule/ProcessModule.module
wire/modules/Process/ProcessPageAdd/ProcessPageAdd.module
wire/modules/Process/ProcessPageClone.module
wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module
wire/modules/Process/ProcessPageEditImageSelect/ProcessPageEditImageSelect.module
wire/modules/Process/ProcessPageEditLink/ProcessPageEditLink.module
wire/modules/Process/ProcessPageList/ProcessPageList.module
wire/modules/Process/ProcessPageLister/ProcessPageLister.module
wire/modules/Process/ProcessPageSearch/ProcessPageSearch.module
wire/modules/Process/ProcessPageSort.module
wire/modules/Process/ProcessPageTrash.module
wire/modules/Process/ProcessPageType/ProcessPageType.module
wire/modules/Process/ProcessPageView.module
wire/modules/Process/ProcessPermission/ProcessPermission.module
wire/modules/Process/ProcessProfile/ProcessProfile.module
wire/modules/Process/ProcessRole/ProcessRole.module
wire/modules/Process/ProcessTemplate/ProcessTemplate.module
wire/modules/Process/ProcessUser/ProcessUser.module
wire/modules/Session/SessionHandlerDB/ProcessSessionDB.module
wire/modules/Session/SessionHandlerDB/SessionHandlerDB.module
wire/modules/Session/SessionLoginThrottle/SessionLoginThrottle.module
wire/modules/System/SystemUpdater/SystemUpdater.module
wire/modules/Textformatter/TextformatterEntities.module
wire/modules/Textformatter/TextformatterMarkdownExtra/markdown.php
wire/templates-admin/debug.inc
wire/templates-admin/default.php
wire/templates-admin/topnav.inc

(Inspired by Manfred62's post: https://processwire.com/talk/topic/7245-translation-for-pw-25/)

  • Like 4
Link to comment
Share on other sites

  • 2 months later...

That is still way to complicated and has the problem that things get wrong and your sites will be probably gone to. Translating all those files manually on your specific server does not make much sense. This is usable for tiny customizations for a specific customer but IMHO most of the translation work needs to be done with a professional tool wher community members can collaborate and where there is some kind of standard Terminlogy and supervision for each Language too.

Thanks for the script Nico but ufff it looks more like a chaos doing it that in such a none shareable way! Some Developers already complain that new ideas might bring to much work and more effort in maintaining things so IMHO Pootle would be the way to go!
https://processwire.com/talk/topic/3317-get-localization/?p=79537

Link to comment
Share on other sites

Well this does not help much, as this translation tool does not allow you to collaborate and share translations for hundreds of sites.

i.e. working on an installatin for 400 churches would mean you need to translate it 400 times - This is complete nonsese as it is redundant work. And with each update you would need to adjust all those 400 translations again in the same manor. "Arbeitsbeschaffungsmassnahme" we say in Germany. I guess we all have much better things to do as repeating this task over and over again.

If you now have also several other projects in parallel running you would need to getalso those idividually up and running. They probably use different modules.

The translation tool in core is a great access to make small tiny adjustments for a specific customer and his very specific needs.

Much better would be to have a centralized translation server like I already suggested here: https://processwire.com/talk/topic/3317-get-localization/?p=79537

This would reduce the workload for each other here in the community as we would be able to collaborate. OK for the next release probably the english language would need to be extracted to but right now this is still a feasable job as the core isn't so big and there are only about 250 modules right now.

Link to comment
Share on other sites

  • 3 weeks later...

Not sure I understand your logic. Why each of the churches need to translate all files themselves?

Of course sharing and updating translations could be smoother, but it's not clearly as bad as you make it sound. The most important parts are done and well made: easy to translate and create language packs (both core and 3rd party modules). No need for any third party service, but updating translations through modules directory would be nice.

Link to comment
Share on other sites

Hi Apeisa I started a new topic as this discussion in the older thread was about finding files on Mac!

You can find it here: https://processwire.com/talk/topic/8389-centralized-translation-of-processwire-and-pw-documentations/
There only a globallised solution should be discussed. Nothing else.

We for us have made the decision already, as we work on multiple projects and we are now looking only on the best globalized way in doing the collaboration part.
We simply can't wait until translations and documentations get done in a collaborative way, also because our devs and customers both are spread all over the world ;-)



 

Link to comment
Share on other sites

  • teppo unpinned this topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...