The Bureau Works WordPress connector (WPC) creates translation projects in Bureau Works from assets in a WordPress server.
This article assumes your WPC has been configured properly and will guide you through creating a project in Bureau Works.
You can check our API documentation here:
If you still don’t know how to authenticate to our API, you can check the steps here:
Creating a translation project with WPC
The endpoint to create a translation using WPC (https://dev.bureauworks.com/#4e54d0dc-d489-4480-afe4-0a403d78db45 ) accepts quite a few parameters. They are detailed in the table below.
Parameter | Type | Description | Required |
orgUnitUUID | string | The UUID of the Organizational Unit under which the project will be created. This information is present in the URL of the Org. Unit. | ✅ |
contactUUID | string |
The UUID of the Project's POC (contact) in Bureau Works |
✅ |
configUUID | string | If specified, will fetch a specific config regardless of the Organizational Unit | ✅ |
ciTag | string | The identifier tag of the project in the Org. Unit. It defaults to wordpress_YYYY-MM-DD_HH-mm |
🚫 |
reference | string |
The name of the project that appears in our dashboard. It defaults to |
🚫 |
sourceLanguage¹ | string | The source language of the assets to be translated. If none is provided, this is retrieved from the Org. Unit’s configuration. | 🚫 |
targetLanguages¹ | list |
The list of target languages the assets should be translated to. If none is provided, this information is retrieved from the Org. Unit's configuration. |
🚫 |
workflows | list | A list of workflows to use for all assets. If none is provided, the workflows will be inferred by our system for each file. | 🚫 |
tags | list | List of tags to add to the project. | 🚫 |
type | string | The type of asset to fetch from WordPress | ✅ |
wpIds | list | List of asset ids to fetch from WordPress. If this is empty, all assets of the given will be considered for translation | 🚫 |
wpPaths | list | Used to include assets whose link matches any entry in this array. Has no effect if wpIds is provided |
🚫 |
wpExcludePaths | list | Assets whose links match elements of this array will not be considered for translation. Has no effect if wpIds is provided |
🚫 |
skipStatusCheck | boolean | If set to true , will create entries regardless of their previous statuses. Default is false |
🚫 |
skipHashCheck | boolean | Whether assets with the same content should be sent for translation again. This needs to be true if a previous project containing the assets was marked as CANCELLED . Default is false |
🚫 |
1 The code
of the language is expected in these parameters. This information is available through the Languages
endpoint on our documentation - https://dev.bureauworks.com/#27de623d-564e-4a38-827b-1d1570a53f7e
Type
is required so the connector knows what to look for.
If wpIds
is not empty, then wpPaths
and wpExcludePaths
will not be taken into account.
Also, the execution will fail if the type of any page provided in wpIds
doesn’t match the Type
parameter.
Including specific pages
The wpPaths
parameter expects a list of paths. If this is provided, only the assets listed will be considered for translation.
Take a look at the following example request:
{ "configUUID": "wordpress-config-uuid", "contactUUID": "contact-person-uuid" "orgUnitUUID": "org-unit-uuid", "targetLanguages": ["es_es","pt_br"], "workflows": ["TRANSLATION","REVIEW"], "Type": "post", "wpPaths": [ "/blog/my-awesome-blog-post/", "/blog/a-surprising-story", "/blog/museum*" ] }
This will create a project to translate the assets with the following slugs:
-
/blog/my-awesome-blog-post
-
/blog/a-surprising-story
-
Every page whose slug contains the
/blog/museum
text. You can use the wildcard character only at end of strings.
This project will contain only the language Spanish (Spain)
and the workflow TRANSLATION
for all files.
Excluding specific pages from translation
The wpExcludePaths
parameter expects a list of paths. If this is provided, the assets listed will not be considered for translation.
This parameter is similar to wpPaths
, so the wildcard character is also available here.
wpExcludePaths
takes precedence over wpPaths
.
This means that if the slug of a page matches values from both lists, the page will not be considered for translation.
Comments
0 comments
Please sign in to leave a comment.