Translate Language Alfresco Community 5.1 to other languages - alfresco

In ..\tomcat\webapps\share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\share\imports\share-header.lib.js:
{
id: "HEADER_SHARED_FILES",
name: "alfresco/menus/AlfMenuBarItem",
config: {
id: "HEADER_SHARED_FILES",
label: "header.menu.shared.label",
targetUrl: "context/shared/sharedfiles"
}
},
But in File share-header.lib.properties I don't find
header.menu.shared.label=Shared Files
How do I translate this?

That particular message key is part of Aikau and is translated within it. If you wish to provide additional language pack support for Aikau then you should read this.

Related

What is the difference between global definitions section and components section?

What is the difference between the global definitions section and the components section in Swagger 2.0?
I came across a Swagger definition YAML file which is marked as swagger: '2.0'.
It has one section called definitions just below parameters. This is similar to what is described in
https://swagger.io/docs/specification/2-0/basic-structure/
under the "Input and Output Models" section.
Also further down the file, it has the components section with the schemas section underneath it. That is similar to what is described in
https://swagger.io/docs/specification/components/
This looks like OAS3.
However, this specific YAML file has both sections. I am not exactly sure whether definitions is for Swagger 2.0 and components and schemas is in OAS 3.0. Is that so?
Can both definitions and components be used in the same YAML file of type swagger: '2.0' or should we stick to either definitions or components?
# definitions section looks like this
definitions:
User:
properties:
id:
type: integer
name:
type: string
# Both properties are required
required:
- id
- name
# components section looks like this
components:
schemas:
Address:
type: object
properties:
line1:
type: string
city:
type: string
I am not exactly sure whether definitions is for Swagger 2.0 and components and schemas is in OAS 3.0. Is that so?
Yes, exactly.
The definitions section is used in OpenAPI 2.0 files (swagger: '2.0').
The components section is used in OpenAPI 3.x (openapi: 3.x.x).
Can both definitions and components be used in the same YAML file of type swagger: '2.0' or should we stick to either definitions or components?
No, you can't mix 2.0 and 3.x syntax in the same file. If your file is swagger: '2.0' you must use 2.0 syntax. If it's openapi: 3.0.0 you must use 3.0 syntax.

FolderDialog QML

I am trying to provide a option for choosing download directory in my qt project. I am trying to execute following code which is available in https://doc.qt.io/qt-5/qml-qt-labs-platform-folderdialog.html#details
:
MenuItem {
text: "Open..."
onTriggered: folderDialog.open()
}
FolderDialog {
id: folderDialog
currentFolder: viewer.folder
folder: StandardPaths.standardLocations(StandardPaths.PicturesLocation)[0]
}
MyViewer {
id: viewer
folder: folderDialog.folder
}
Can anyone tell me what is "MyViewer" here? If it is a class , can you give me some idea how to handle with that class?
Usually when documentation uses any type starting with My..., it means that that type is defined by the user.
In this example, it doesn't really matter what the actual implementation of MyViewer is. What matters, is that it influences the FolderDialog before it is opened and than uses the folder that was chosen in the Dialog.
To execute that code you would need to define your own MyViewer component. Or just scrap the MyViewer entirely.

SuiteScript 2.0 Intellisense create search filter

I'm just starting out with suitescript, and I was wondering how to get the intellisense to work in suitescript 2.0 on creating a saved search.
I know this is easy to do on the netsuite UI but I would like to learn how to do it in Suitescript. Here is example code below. I'm trying to use ctrl + space to show options on the Customer type. I've tried adding ['N/record'] and it gave me options on records.Type.(here were the options) but I can't get it to give me anything inside the filter single quotes.
define(['N/search'],
function(search) {
var MYsearch = search.create({
type: search.Type.CUSTOMER,
title: 'My Customer search',
filters: ['', '', ''] // here is where i want intellisense
})
as a side question: Does anyone know a good place for suitescript 2.0 questions and answers? stackoverflow seems to be lacking. I'm assuming because it's pretty much brand new.
(I know of all the tutorials on the help center and SuiteAnswers)
Thanks for the help!
UPDATE: It looks like Netsuite 2.0 doesn't like Internal IDs... hope that helps.
I usually just create an array for filters, and another for columns, then add my filters to that array like sovar arrFilters = [];
arrFilters.push(search.createFilter({
name: 'mainline',
operator: search.Operator.IS,
values: ['F']
}));
arrFilters.push(search.createFilter({
name: 'trandate',
operator: search.Operator.WITHIN,
values: 'lastMonth',
}));
var arrColumns = [];
// invoiceid
arrColumns.push(search.createColumn({
name: 'internalid',
join: 'appliedtotransaction'
}));
Then you can just use your
search.create({
type: search.Type.VENDOR_PAYMENT,
filters: arrFilters,
columns: arrColumns
});
Hope this helps.
Download the latest SuiteCloud Developer IDE or the Eclipse Mars version (just make sure you have downloaded SuiteCloud plugin SuiteCloud IDE - http://system.netsuite.com/download/ide/update_e4). With this IDE, you will be able to have API code assist for SuiteScript 1.0. However, there is other setup to enable it for SuiteScript 2.0. Also, this will enable you to have intellesense for native fields.
Then if you want to include custom fields/columns, setup your master password at main menu >Netsuite>Master Password>.
Get the list of your accounts from the production, sandbox, and beta environment. Do this at main menu >Netsuite>Manage Account>. If you will be added to a new customer account later, you need to add it manually by doing this step again to reflect it.
Now, you need to connect your project folder to NetSuite account. But first, check the project setting by right clicking to the project folder>NetSuite>Change Project Settings>. Then, make sure you will be using the correct account.
Then log-in to the account by right clicking the project folder >NetSuite>Log in to Project Account>. Once successfully logged-in.
Finally, right click again the project folder >NetSuite>Sync Script IDs from Account>. Follow the instructions and select record type and fields.

set alfresco dateTextBox to empty

I want to set an empty value for Alfresco Aikau DateTextBox widget.
But the date is being set to "1970/1/1" automatically. How can i set a date to empty in Aikau ?
I'm trying this code in the jsonModel but it's not working:
{
name:"alfresco/forms/controls/DateTextBox",
widthPx:"90",
config:{
fieldId:"DATE_1",
additionalCssClasses:"datefield",
name:"Date1",
value:"",
requirementConfig:{
initialValue:false
}
}
}
What version of Aikau are you using? We've made a number of changes to the alfresco/forms/controls/DateTextBox widget since it was first created. If the problem still persists in the latest version (which at the time of writing is v1.0.57) then you should raise a JIRA ticket or GitHub issue. There is a new release of Aikau each week and they are all backwards compatible so you should be able to take advantage of bugs fixes as soon as they are available. All bugs are prioritized ahead of features as the intention is that there should be no technical debt on the Aikau project. See this blog post for information on how to use new Aikau releases.
I am not sure regarding why it is not working with existing alfresco/forms/controls/DojoDateTextBox widget.I did following,for making it work.
1.I have created a new widget,Placed below content in the file.(This content is copied from existing widget)
define(["dojo/_base/declare",
"alfresco/forms/controls/DateTextBox"],
function(declare, DateTextBox) {
return declare([DateTextBox], {});
});
2.Used that widget by using following.
name : "js/Demo/MyCustomWidget",//It is the path of my custom widget.
widthPx: "90",
config :
{
fieldId : "DATE_1",
additionalCssClasses: "datefield",
name : "Date1",
value : undefined,//This must be undefined,neight null nor ""
requirementConfig:
{
initialValue: false
}
}
In case of aikau control,you can find source code inside tomcat\webapps\share\WEB-INF\lib\aikau-1.0.8.1.jar.Version of aikau jar file may differ depends on your alfresco version.

Searching through multilingual records using ElasticaBundle & Translatable

I've created a multi-lingual website with Symfony2 using the (Gedmo) Translatable behavior extension for Doctrine2. This works fine but now i'm looking for a way to use the ElasticaBundle to create a nice searchoption. I want German users to search in the German-translation but also in the English translation.
At the moment i'm trying to use separate indexes for each language. My config.yml looks like this:
foq_elastica:
clients:
default: { host: localhost, port: 9200 }
indexes:
articles_en:
client:default
types:
article:
mappings:
name: { boost: 5, analyzer: my_analyzer }
persistence:
driver: orm
model: Test\SiteBundle\Entity\Article
identifier: id
provider:
service: elastica.translation.provider.article.en
finder:
articles_de:
....
articles_nl:
.....
This works fine if you want to search through one index but searching two indexes seems not possible with this bundle or am I wrong?
Is there a way to do this? Any help will be appreciated!
Rick
You should probably just add one index for every article in every language and add a language to your index. You can then search your index for articles in one or more languages.

Resources