PoEdit doesn't recognize php dgettext function - poedit

How can I configure PoEdit to recognize PHP dgettext function ?
Note that I know about the Configure->Keywords part, but how am I suppose to indicate that the translation is in the second parameter of the function ?
Anyone got poEdit work with dgettext ?

Using the :2 xgettext option, so the keyword that must be added in PoEdit is:
dgettext:2
the :2 specify to read the 2nd parameter.
If I would need to read the 2nd and 3rd, it would be: :2,3
Note that I had another bug, by default, dgettext is supported by xgettext (and poEdit) as it's a standard C/C++ gettext function.
Hope this will help

Related

Is Laravel blade '#include()' case-sensitive?

I'm getting a "blade not found shop.cart.favorites" error when running in Docker on Ubuntu. (Therefore: "case-sensitive file system.")
I suspect that the culprit is case-sensitivity. The path to the blade file is:
resources/views/Shop/Cart/favorites.blade.php
^ ^
Did I guess correctly?
You have made a little mistake bro...
Change in your Controller/Function where you defined the View .Like this.....
return View('Shop.Cart.favorites');
It will work.. Check it out..
Thank you.
In the process of rendering a View, the view() method in Laravel checks to see if a Blade template file exists at the path provided using the PHP built-in method file_exists().
Although the docs don't mention it at all, it has long been observed that this function can be case sensitive (typically on *nix-based filesystems, though not on Windows). But since you don't necessarily know where your code will be run (e.g. if you are creating a package), best practice for cross-platform compatibility is to use only lowercase filenames for Blade template files.
Okay, thanks folks. Indeed, that's the [ANSWER] I was expecting: the underlying filesystem is case-sensitive, and therefore so is PHP (file_exists() et al ...), and therefore so is Laravel. Blade file and folder names are case-sensitive.
Now ... here's a follow-on question: is there a handy-dandy plugin for Laravel that might enable me to "skate around" this issue? (Yeah, I think I know what that answer will be, too. But it doesn't hurt to ask ...)

PoEdit, how to discard translations not being used?

I need to know how to mark or delete the translations not being use by the project.
Is there a way to do this? I have read about PoEdit, and I can't find anything.
Simple: update the PO file from your source code. That removes unused strings and adds new strings. See the GNU gettext manual (there's a link in the Help menu) for in-depth explanation of gettext concepts like that.
P.S. The name's "Poedit", not "PoEdit".

How to get collections from sub-folder in docpad?

my folds structure are something like this:
documents
techs
docs
I want to get a collection from docs, my code is :
techs: ->
#getCollection("html").findAllLive({relativeOutDirPath: /techs/docs/},[{date: -1}]).on "add", (model) ->
model.setMetaDefaults({layout: "post"})
It just won't works... Could somebody tell me what's going on?
The /techs/docs/ in {relativeOutDirPath: /techs/docs/} is parsed as a regular expression, rather than a string. Wrap it in quotes so you have {relativeOutDirPath: "/techs/docs/"} instead. You may or may not need the initial slash, I can't remember.
You may want to use the convenient helper provided by Docpad : getFilesAtPath.
Maybe you should read the file "docpad.coffee"
There is a section "collection", you can set collection named "html", and select all files in (database).
I've had problems depending on what system I'm running node.js and docpad on (ie Windows) with file path conventions. So I resort to the following to make sure I'm not having any of those sort of problems:
#getCollection("html").findAllLive({relativeOutDirPath:path.join('techs','docs')},[date:-1])
Note the 'path.join' bit
Just as example, all html documents from path starts with "post"
#getCollection("html").findAllLive({relativeOutDirPath: {$beginsWith: 'post'}})

How Do I Specify a Keyword for Dash with Doxygen?

I am using Doxygen for generating documentation for my project, which generates docsets that work almost perfectly with dash.
What I want to know is how to set the search keyword in dash; the default is "unknown:"
What do I need to change so that it reads something other than "unknown:". Can I change this in Doxygen?
I'm Dash's developer. Dash uses the DocSetPlatformFamily key in the Info.plist file inside the docset to determine the default keyword. Unfortunately, Doxygen has no option as far as I'm aware to set this value. I will contact the Doxygen team and ask them to add this option. Feel free to do the same.
For now, my best recommendation would be to write a post-generation script that would add the required key in the Info.plist file (it's just a text file).
For example, this should work:
perl -pi -w -e "s/<\/dict>/<key>DocSetPlatformFamily<\/key><string>__DESIRED KEYWORD__<\/string><key>DashDocSetFamily<\/key><string>doxy<\/string><\/dict>/s" Info.plist
Note: I've also added a "DashDocSetFamily" entry with a value of "doxy". This will cause Dash to handle the docset as a Doxygen-generated one and display the filterable table of contents.
In case you haven't found them already, here are some recommended settings for generating a Doxygen docset for use in Dash:
SEARCHENGINE = NO
DISABLE_INDEX = YES
GENERATE_TREEVIEW = NO

Is it possible to set line limitation in the AStyle

I am using AStyle to format C or cpp source codes. I am just wondering it is possible to set line limitation in the AStyle?
No, it is not, but the author has stated that this will come in a future update.
http://astyle.sourceforge.net/news.html

Resources