This project is read-only.

How to create language packs?

May 4, 2011 at 5:43 PM

I can't quite figure out how to create a new lanugage pack. I saw something in an older post that i tried, which was downloading latest source, building solution in release mode, running \languagePacks\generate.bat. But i get an exception while trying to generate the lanugages (with or without my custom language...): 


 - Generating obj\StoryQ.flit.pt-BR.g.cs code from src\pt-BR.txt..\src\StoryQ\StoryQ.flit.tt(-1,-1) : error : The host threw an exception while trying to resolve the assembly reference '$(SolutionDir)..\lib\development\Flit.dll'. The transformation will not be run. The following Exception was thrown:System.IO.FileLoadException: Angivet sammansättningsnamn eller -kodbas är ogiltigt. (Undantag från HRESULT: 0x80131047)   vid System.Reflection.AssemblyName.nInit(RuntimeAssembly& assembly, Boolean forIntrospection, Boolean raiseResolveEvent)   vid System.Reflection.AssemblyName..ctor(String assemblyName)   vid Microsoft.VisualStudio.TextTemplating.GlobalAssemblyCacheHelper.GetLocation(String strongName)   vid Microsoft.VisualStudio.TextTemplating.CommandLine.CommandLineHost.ResolveAssemblyReference(String assemblyReference)   vid Microsoft.VisualStudio.TextTemplating.Engine.ResolveAssemblyReferences(ITextTemplatingEngineHost host, TemplateProcessingSession session)..\src\StoryQ\StoryQ.flit.tt(-1,-1) : error : The host threw an exception while trying to resolve the assembly reference '$(SolutionDir)..\lib\development\Irony.dll'. The transformation will not be run. The following Exception was thrown:System.IO.FileLoadException: Angivet sammansättningsnamn eller -kodbas är ogiltigt. (Undantag från HRESULT: 0x80131047)   vid System.Reflection.AssemblyName.nInit(RuntimeAssembly& assembly, Boolean forIntrospection, Boolean raiseResolveEvent)   vid System.Reflection.AssemblyName..ctor(String assemblyName)   vid Microsoft.VisualStudio.TextTemplating.GlobalAssemblyCacheHelper.GetLocation(String strongName)   vid Microsoft.VisualStudio.TextTemplating.CommandLine.CommandLineHost.ResolveAssemblyReference(String assemblyReference)   vid Microsoft.VisualStudio.TextTemplating.Engine.ResolveAssemblyReferences(ITextTemplatingEngineHost host, TemplateProcessingSession session)- Generating PNG and SVG from src\pt-BR.txt - if dot is installed - www.graphviz.orgdot är inte ett internt kommando, externt kommando,program eller kommandofil.dot är inte ett internt kommando, externt kommando,program eller kommandofil.- Compiling bin\StoryQ.pt-BR.dll from obj\StoryQ.flit.pt-BR.g.csobj\StoryQ.flit.pt-BR.g.cs(1,1): error CS0116: Ett namnområde innehåller inte direkta medlemmar, som till exempel fält eller metoder- Generating obj\StoryQ.flit.sr-SP.g.cs code from src\sr-SP.txt..\src\StoryQ\StoryQ.flit.tt(-1,-1) : error : The host threw an exception while trying to resolve the assembly reference '$(SolutionDir)..\lib\development\Flit.dll'. The transformation will not be run. The following Exception was thrown:System.IO.FileLoadException: Angivet sammansättningsnamn eller -kodbas är ogiltigt. (Undantag från HRESULT: 0x80131047)   vid System.Reflection.AssemblyName.nInit(RuntimeAssembly& assembly, Boolean forIntrospection, Boolean raiseResolveEvent)   vid System.Reflection.AssemblyName..ctor(String assemblyName)   vid Microsoft.VisualStudio.TextTemplating.GlobalAssemblyCacheHelper.GetLocation(String strongName)   vid Microsoft.VisualStudio.TextTemplating.CommandLine.CommandLineHost.ResolveAssemblyReference(String assemblyReference)   vid Microsoft.VisualStudio.TextTemplating.Engine.ResolveAssemblyReferences(ITextTemplatingEngineHost host, TemplateProcessingSession session)..\src\StoryQ\StoryQ.flit.tt(-1,-1) : error : The host threw an exception while trying to resolve the assembly reference '$(SolutionDir)..\lib\development\Irony.dll'. The transformation will not be run. The following Exception was thrown:System.IO.FileLoadException: Angivet sammansättningsnamn eller -kodbas är ogiltigt. (Undantag från HRESULT: 0x80131047)   vid System.Reflection.AssemblyName.nInit(RuntimeAssembly& assembly, Boolean forIntrospection, Boolean raiseResolveEvent)   vid System.Reflection.AssemblyName..ctor(String assemblyName)   vid Microsoft.VisualStudio.TextTemplating.GlobalAssemblyCacheHelper.GetLocation(String strongName)   vid Microsoft.VisualStudio.TextTemplating.CommandLine.CommandLineHost.ResolveAssemblyReference(String assemblyReference)   vid Microsoft.VisualStudio.TextTemplating.Engine.ResolveAssemblyReferences(ITextTemplatingEngineHost host, TemplateProcessingSession session)- Generating PNG and SVG from src\sr-SP.txt - if dot is installed - www.graphviz.orgdot är inte ett internt kommando, externt kommando,program eller kommandofil.dot är inte ett internt kommando, externt kommando,program eller kommandofil.- Compiling bin\StoryQ.sr-SP.dll from obj\StoryQ.flit.sr-SP.g.csobj\StoryQ.flit.sr-SP.g.cs(1,1): error CS0116: Ett namnområde innehåller inte direkta medlemmar, som till exempel fält eller metoderTryck ned valfri tangent för att fortsätta...

Coordinator
May 5, 2011 at 8:34 AM

I think there's currently a bug in that batch file, which i'll take a look at ASAP.

Are you using visual studio 2010 or 2008 (and regardless of which you're using, which are installed?)

Regards - Rob

May 5, 2011 at 8:52 AM

I have both installed, but i was using VS2010 to build.

Thanks for a great tool BTW. I'm just getting started with writing specs BDD style and i'm really liking it so far.

Coordinator
May 5, 2011 at 10:24 AM

Another question: do you have a 32 bit or 64 bit OS (is there a ProgramFiles(x86) directory in C?)

May 5, 2011 at 10:48 AM

I've got a 64 bit Windows 7 Professional OS.

Coordinator
May 5, 2011 at 11:04 AM

ok, so the bat file was fine when I only had to worry about VS2008 and 32 bit operating systems. We have to move to powershell now, so can you try the generate.ps1 file in my latest checkin,  http://storyq.codeplex.com/SourceControl/changeset/changes/2d36d2927f4d?

it seems to work fine on my 32bit 2010 setup

-Rob

May 5, 2011 at 12:59 PM

More success this time! It didn't work completely out of the box for me this time either. I had to change the generation script slightly:

$tt = $env:CommonProgramFiles+'\Microsoft Shared\TextTemplating\10.0\TextTransform.exe'
pointed into C:\Program Files\Common Files\<more path> while the file is acually located in C:\Program Files (x86)\Common Files\<more path> on my system.

But i hard coded in my own path for that variable and got some other errors :-)
It seemed i had to unblock the lib files because the were downloaded from the internet (there's alot of security shenanigans in Windows 7 for sure) , but once that was done i was able to run the generation script.
I still got some errors due to not having installed "dot", but I'm guessing I don't need that (the binaries were generated successfully anyway it seems)?

I'm going to try to create a swedish language file now and see how that works out for us.

Thanks for the help!

May 5, 2011 at 1:27 PM

I've just tried to build a swedish language pack, but when generating the assembly, it can't seem to handle the swedish caracters å Å ä Ä ö Ö, is that just how it is, or is there something to be done about that?

Coordinator
May 5, 2011 at 7:21 PM

Hmm, looks like a limitation of the parsing system that storyQ uses, I can't see anything immediately wrong here: http://flit.codeplex.com/SourceControl/changeset/view/7d4248de843b#src%2fFlit%2fFlit%2fFlitGrammar.cs

May 6, 2011 at 7:57 AM

Yeah, it seems that way. I used a and o instead though and did a generation, then picked the code from the obj folder and hand coded the åäö characters back again, so I got a solution that works for me. Thanks!

Regards, Carl

Coordinator
May 6, 2011 at 8:58 AM

cool!

Would you be happy to share your translation? If you just post the file on here i'll make sure it's correctly integrated.

May 6, 2011 at 9:05 AM

Well, my translation file is not really a correct translation to swedish (since I can't use å, ä and ö), and I assume it's the text file you would like to integrate rather than the class I hand-coded?

Coordinator
May 6, 2011 at 9:14 AM

yes, just the text file please, but if you post the correct text file (with å, ä and ö) then i can follow the same process as you

May 6, 2011 at 12:39 PM

Sure, here's the text file I was trying to use:

digraph StoryQ{

    //states
    Berättelse                      [shape=doublecircle,                 tooltip="This is the root item of any story"]
    Nytta                           [                                    tooltip="The real-world objective (business value) of a story"]
    Roll                            [                                    tooltip="The role (a category of actors/users) or roles that receive this benefit. "]
    Funktion                        [                                    tooltip="The software process that will implement the specified benefit."]
    Scenario                        [                                    tooltip="The name of each scenario within a story. You can think of each scenario as a chapter in a book."]
    Förutsättning                   [fillcolor=skyblue, style=filled,    tooltip="The preconditions that are meant to be present at the beginning of the scenario."]
    Operation                       [fillcolor=skyblue, style=filled,    tooltip="The action(s) that are performed upon the system under test"]
    Utfall                          [fillcolor=skyblue, style=filled,    tooltip="The result that is expected from executing the specified actions on the specified initial state"]
                                 
                                 
    //transitions                
    Berättelse->Nytta               [label="FörAtt",                     tooltip="Describe the real-world value for this story. What is the business process that the user requires software support from?",indentlevel="1"]
    Nytta->Nytta                    [label="Och",                        tooltip="Describe any secondary business functions that this story will support",indentlevel="2"]
                                 
    Nytta->Roll                     [label="Som",                        tooltip="The role of the person who is the intended user of this feature",indentlevel="1"]
    Roll->Roll                      [label="EllerSom",                   tooltip="Any other roles that may use this story",indentlevel="2"]
    
    Roll->Funktion                  [label="VillJag",                    tooltip="Describe the software process (features) that will support the business requirement",indentlevel="1"]
    Funktion->Funktion              [label="Och",                        tooltip="Any other features that will implement the desired benefit",indentlevel="2"]
    
    
    Funktion -> Scenario            [label="MedScenario",                tooltip="Add a scenario ('given'/'when'/'then') to this story. Scenarios can be added (and will be run) in sequence. Each scenario should have a short descriptive name.",indentlevel="3"]

    Scenario -> Förutsättning       [label="Givet",                      tooltip="Provide the initial context to the scenario. Try not to describe behaviour or actions, this step describes and sets up initial state",indentlevel="4"]
    Förutsättning -> Förutsättning  [label="Och",                        tooltip="Provide another precondition to describe our scenario's initial state",indentlevel="5"]
    
    Förutsättning -> Operation      [label="När",                        tooltip="Describe the actions that are done to the system under test. '",indentlevel="4"]
    Operation -> Operation          [label="Och",                        tooltip="Provide another action that is to be performed on the system, prior to our check for behaviour ('then')",indentlevel="5"]
                                   
    Operation -> Utfall             [label="Så",                         tooltip="Describe the system's behaviour that the prior state and actions should elicit",indentlevel="4"]
    Utfall -> Utfall                [label="Och",                        tooltip="Provide another resultant behaviour to check for",indentlevel="5"]
                                   
    Utfall -> Scenario              [label="MedScenario",                tooltip="Add another scenario to this story. StoryQ executes these scenarios one after the other, so state can be shared between a single story's scenarios.",indentlevel="3"]
}