I use the node module i18n (with Node & Express) for internationalization.
Because the json file is becoming so long, I would prefer to use multiple json files for a single language.
Is this possible within this node module?
I am thinking of for example having a folder for each language with multiple files in that folder.
Or combining multiple language/json files in a single en.json by importing them in en.json.
What would be the best way to split up the content in multiple files for a single language, within the boundaries of this node module?
Related
Looking for a solution.
I am looking for a AutoCAD .lsp (lisp) routine to search various folders drawings (.dwg files) to a specific layer name. The result in an excel list of the found dwg files where the specific layer is located. For example select folder and even subdirs. Look for given layer name: .... Seach and result, only the drawings that contains layer name ..... I have a lisp routine that will scan in a folder of drawings for all layer names. I want to specify it. It must be in a atnother solution. To specify to search various folders drawings (.dwg files) for a specific layer name. The result in an excel list of the found dwg files where the specific layer is located. You can read the current code in the topic. And that code works. I would like an extension to the existing module with function as described in the topic.
Open File Explorer.
Go to File --> Change Folder and search options
From the Search tab choose: Always search file and contents.
Since when can Windows read in AutoCAD files for a specific layer name?
It's not working.
AutoLISP is a popular high-level language used for programming in CAD Packages such as AutoCAD, BricsCAD or ZWCAD. Using AutoLISP, you can create customised CAD commands to perform actions in order to generate the desired output. AutoLISP comes already loaded with a full version of AutoCAD.
With lisp you can use getstring to specify a layer name, acet-ui-pickdir to select a folder, ObjectDBX/vla-get-layer to go within a drawing database, and then return the search results to a csv file to write.
I am trying to figure a way to use already translated .md files (Russian Language) with Sphinx. I use readthedocs.io and I have already read the process of making translatable files (.po/.pot) from:
(1) https://docs.readthedocs.io/en/latest/localization.html
(2) https://docs.readthedocs.io/en/latest/guides/manage-translations.html.
This process requires to make .po or .pot files, translate them, and then produce translated html files - served under https://project.readthedocs.io/$language/$version
What I want is to use a different directory (for example named ru) and place there the Russian .md files.
Is that possible? How is it possible to avoid creating these .po/.pot files?
We have one Sinatra app and one Backbone app.
I saw Sharing the same codebase across multiple apps but didn't understand it or how I could implement it.
This question is not really specific to Sinatra or Backbone; it could be pretty much any apps. Using Heroku and Git
One idea is to put the HTML on S3, but we aren't using S3 to store HTML. And how would you get it from Git onto S3? It seems very convoluted.
So, is there a good way of sharing HTML templates between the apps?
We do it by having a containing parent directory, and well-defined paths to the common files, and by having a common YAML file used to tell different apps where to look.
Create a common YAML file that contains a Hash, with the keys being a common-name for a particular resource or path to resources, and the value being the absolute path to that on the disk.
For instance:
---
html: /absolute/path/to/shared/html
images: /absolute/path/to/shared/images
main_css: /absolute/path/to/shared/styles.css
Load that using Ruby with:
require 'yaml'
SHARED_RESOURCES = YAML.load_file('/absolute/path/to/shared_resources.yaml')
# => {"html"=>"/absolute/path/to/shared/html", "images"=>"/absolute/path/to/shared/images", "main_css"=>"/absolute/path/to/shared/styles.css"}
Use the resulting SHARED_RESOURCES hash to retrieve the information you need:
main_css = SHARED_RESOURCES['main_css']
# => "/absolute/path/to/shared/styles.css"
You can use that same YAML file from ANY language that can read YAML, or where you can open that file and parse its contents. At that point, all your code-bases can play from the same sheet of music, and will know how to access the common files when necessary.
For instance, from Perl:
use YAML;
$SHARED_RESOURCES = Load('
---
html: /absolute/path/to/shared/html
images: /absolute/path/to/shared/images
main_css: /absolute/path/to/shared/styles.css
');
print $SHARED_RESOURCES->{'main_css'}, "\n";
>> /absolute/path/to/shared/styles.css
If you want to get fancier, use a database to hold those shared resources. Either way, the idea is there's just one place for the code to look for a particular resource/file.
I am using DMExpress tasks to do taransformations on my business data. These business data come in multiple format/layout. I need to be able to use single task for transformation on multiple source layouts. Any DMExpress experts here??
One way that I found out for doing transformation on multiple source layouts with the help of single task was by using the Dmexpress SDK to write the script for the task rather than building the tasks using the GUI task editor. SDK gives lot more flexibility compared to the GUI editor.
But if you are bound to GUI then there is a way around for this specific purpose. You should define a common name for the source layout. Only the source layout name is binded to the task but not the actual layout definition. So you can alter the layout definition while keeping the layout name constant to get a generic task.
FYI- DMExpress is now called DMX (Syncsort changed the name about a year ago).
Do you have multiple different record types within a single file or is each type of record in a separate file? Your question is not clear on this.
If they are in separate files, this is very easy, but you will need to create a separate DMX task for each file. In each of these tasks, define one of the files as the source and create a record layout that matches the format of that file.
If they are in the SAME file, it is only a little more difficult. You can split them into separate files by creating multiple targets and defining a named condition for each target using the SourceName() function (this function returns the name of the file that the current record came from). Then you can process them as separate files (see above). This works UNLESS you have a parent-child relationship going on between the different types of records in that single file. If that is the case, please post some sample data and I can advise on how to handle it.
I created a C# snippet that calls 7zip (7za) to add a list of files to a zip archive. Problem is multiple files in different directories have the same name, so 7zip either complains about duplicate names or replaces the first file with the second only storing the last added. I cannot recursively scan a directory which would allow duplicates.
Is there a way to force 7zip to store the directory, or in ASP.NET MVC 3 C# to create zip files with duplicate file names when not considering the full path?
The path to our image is the GTIN number broken up by every five digits. The last five are the name of the image.
G:\1234\56789\01234.jpg
G:\4321\09876\01234.jpg
G:\5531\33355\01234.jpg
These would fail to all store in a 7zip archive correctly.
You can use SevenZipSharp: http://sevenzipsharp.codeplex.com/ a wrapper around 7zip. You will have full control from code.
We managed to get multiples in the same archive by creating a file list that doesn't contain leading backslashes, then running the application from the directory containing them:
1234\56789\01234.jpg
4321\09876\01234.jpg
5531\33355\01234.jpg
It solves it for now. Anyone with a better idea?