Hi, I have FW6Pro and want to use the Current Date Action. The problem is that it only has a few languages. I want it in portuguese. How can I do this? Is there a way to edit this action and create my own language?
Thanks in advance.
I’ve done it once a couple of years ago simply by opening and editing the action itself in a text editor (like TextMate, Code or whatever)
Just changed the language like this :
function WriteDate(writeday)
{
var mydate=new Date();
var year=mydate.getYear();
var day=mydate.getDay();
var month=mydate.getMonth();
var daym=mydate.getDate();
if (year < 1000)
year=year+1900;
var dayarray=new Array('zondag','maandag','dinsdag','woensdag','donderdag','vrijdag','zaterdag');
var montharray=new Array('januari','februari','maart','april','mei','juni','juli','augustus','september','oktober','november','december');
if (writeday)
document.write(dayarray[day]+", ");
document.write(daym+" "+montharray[month]+", "+year);
}
Made sure to change this line as well in order no make it an individual action next to the original :
Hi Richard,
But how can I edit an action that is in the core application? It wasn’t downloaded from actionsforge. Besides, I searched for it in the Actions Folder and it isn’t there.
Thanks.
Many thanks DeltaDave.
I Right-Clicked the Standard.fwactionb file, contents, etc., and found the Current Date.fwaction file. Now, I can also edit it with TextEdit. Great! I Already made a safe copy of it giving it a new name.
Then I edited Current Date.fwaction file. Added lines for portuguese language and saved it. Double clicked on it to install the action (replaced the older one).
The result wasn’t good. My whole site isn’t previewing correctly. Something went wrong. Have I missed anything here?
Got it, finally! I was working on the wrong file (a copy of the original Standard.fwactionb file).
So I will write down all the steps, for other people wishing to implement this action in other languages not featured in FW. My version is FW6Pro.
Right-click on the FW application icon and select Show Package Contents.
Select folder Contents/SharedSupport/Actions.
Right-click the file Standard.fwactionb and select Show Package Contents.
Select folder Contents/Resources/Actions/Other.
Make a safe copy of the Current date.fwaction file, in case anything goes wrong. Open file Current Date.fwaction with a text editor (TextEdit will do it).
You have to edit (add) your language parameters in 3 sections of the text: a) the action popup, b) the action javascript, and c) a conditional case. (just copy paste the text of a language and replace it with the one you want to add).
Save the file while you’re in the Text Editor and close it.
Click back in Finder, until you see the Standard.fwactionb file again.
Double-Click on Standard.fwaction file to update this action (you will replace the old settings).
That’s it. Thanks to van Heukelum and DeltaDave. I wouldn’t get there without your help.
Actually, as long as you incremented the version number, this would be preferred. Freeway searches the user’s Library/Application Support folder, then the system’s Application Support folder, and then the application bundle (where you were editing initially). The newest of any of these “wins” when dealing with duplicate Actions. If you have two or more identical (version, modification date, and/or contents) actions in any of these places, then you will see an alert each time Freeway starts up, telling you that it had to guess which one you really wanted.
Double-clicking an Action, or dragging it over the Freeway icon in the Dock, will install the Action in your ~/Library/Application Support Freeway [version]/Actions folder, where it will be found.
Any time you modify the Actions directly inside of Freeway’s application bundle (right-click on the app icon, in other words) you will set yourself up to lose those modifications next time you upgrade Freeway. Actions you place in your Library (or the System/Library) will survive upgrades. This is the recommended path to take.
Walter
On Feb 19, 2013, at 11:34 AM, DeltaDave wrote:
i wouldn’t have double clicked to install it - simply overwrite with the new version.
Little problem with ordered lists in Markdown (the formatting engine used in the Web archive of this mailing list) – the number you use to begin your list item doesn’t actually matter. You could number all of the steps with a 1, and they would come out as 1, 2, 3, 4, etc.
Walter
On Feb 19, 2013, at 11:45 AM, DeltaDave wrote:
Make sure that TextEdit is in Plain Text mode. (Better to be safe than sorry)
That should have read as: 11. Make sure that TextEdit is in Plain Text mode. (Better to be safe than sorry)
Actually, as long as you incremented the version number, this would be preferred. Freeway searches the user’s Library/Application Support folder, then the system’s Application Support folder, and then the application bundle (where you were editing initially). The newest of any of these “wins” when dealing with duplicate Actions. If you have two or more identical (version, modification date, and/or contents) actions in any of these places, then you will see an alert each time Freeway starts up, telling you that it had to guess which one you really wanted.
Never exactly sure exactly where I should be making the version number changes to avoid duplication.
It appears that there are several places you need to do it. I am sure there is a definitive guide over at ActionsForge but I haven’t read it.
In a bundle Action, there is a plist with the version number (which is what gets reported in Finder) and within the Action itself, there will be an <action-version> tag inside each Action within each .fwaction file. The part that Freeway cares about here is the version attribute within the <action-version> tag, as in <action-version version="123">.
I used to track all the various Actions in my bundle and combo Actions at their own individual release numbering, but I gave up years ago and just rev all Actions within a single file every time anything changes, no matter which one changes.
Walter
On Feb 19, 2013, at 11:59 AM, DeltaDave wrote:
It appears that there are several places you need to do it. I am sure there is a definitive guide over at ActionsForge but I haven’t read it.
Well, you were right. This morning when I opened Freeway there was a message about duplicate actions. The changes I made yesterday in Current date.fwactions file were gone.
So I went to my FW User Folder and deleted the duplicated actions. Everything is ok now and Current date action is working like I want.
So, let’s see if I got this right.
When I change a previously installed action, there’s no need to install it again (double-clicking). Just have to save the file, restart FW, and changes will take effect.
When changing an action within FW App Folder, it’s safer to copy that action into my FW User Folder and edit it there. The files can be duplicated in both folders, as long as the newest version is in the User’s Folder.
Well, you were right. This morning when I opened Freeway there was a message about duplicate actions. The changes I made yesterday in Current date.fwactions file were gone.
So I went to my FW User Folder and deleted the duplicated actions. Everything is ok now and Current date action is working like I want.
So, let’s see if I got this right.
When I change a previously installed action, there’s no need to install it again (double-clicking). Just have to save the file, restart FW, and changes will take effect.
When changing an action within FW App Folder, it’s safer to copy that action into my FW User Folder and edit it there. The files can be duplicated in both folders, as long as the newest version is in the User’s Folder.