Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ajustement des libellés français pour le browse #2540

Closed
wants to merge 19 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@
"input": "src/themes/dspace/styles/theme.scss",
"inject": false,
"bundleName": "dspace-theme"
},
{
"input": "src/themes/calypso/styles/theme.scss",
"inject": false,
"bundleName": "calypso-theme"
}
],
"scripts": [],
Expand Down
1 change: 1 addition & 0 deletions config/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
config.*.yml
!config.calypso.yml
!config.example.yml
248 changes: 248 additions & 0 deletions config/config.calypso.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,248 @@
#############################################################################
# Fichier de configuration local, avec des propriétés spécifiques
# à l'environnement d'exécution. L'ordre de priorité des configurations
# est:
#
# 1) Variables d'environnement
# 2) Fichier config/config.calypso.yml
# 3) Fichier config/config.[prod|dev|test].yml
# 4) Fichier config/config.yml
#
# À noter qu'une variable d'environnement est nécessaire pour que le fichier
# .local soit lu:
#
# export DSPACE_APP_CONFIG_PATH=config/config.calypso.yml
#
# Voir config/config.server.ts pour les détails
#############################################################################


# On va définir dans ce fichier tout ce qui est commun à l'application
# Calypso, peu importe son environnement d'exécution

# Form settings
form:
# Sets the spellcheck textarea attribute value
spellCheck: true
# NOTE: Map server-side validators to comparative Angular form validators
validatorMap:
required: required
regex: pattern

# Notification settings
notifications:
rtl: false
position:
- top
- right
maxStack: 8
# NOTE: after how many seconds notification is closed automatically. If set to zero notifications are not closed automatically
timeOut: 5000 # 5 second
clickToClose: true
# NOTE: 'fade' | 'fromTop' | 'fromRight' | 'fromBottom' | 'fromLeft' | 'rotate' | 'scale'
animate: scale

# Submission settings
submission:
autosave:
# NOTE: which metadata trigger an autosave
metadata: []
# NOTE: after how many time (milliseconds) submission is saved automatically
# eg. timer: 5 * (1000 * 60); // 5 minutes
timer: 0
icons:
metadata:
# NOTE: example of configuration
# # NOTE: metadata name
# - name: dc.author
# # NOTE: fontawesome (v5.x) icon classes and bootstrap utility classes can be used
# style: fas fa-user
- name: dc.author
style: fas fa-user
# default configuration
- name: default
style: ''
authority:
confidence:
# NOTE: example of configuration
# # NOTE: confidence value
# - name: dc.author
# # NOTE: fontawesome (v5.x) icon classes and bootstrap utility classes can be used
# style: fa-user
- value: 600
style: text-success
- value: 500
style: text-info
- value: 400
style: text-warning
# default configuration
- value: default
style: text-muted

# Default Language in which the UI will be rendered if the user's browser language is not an active language
defaultLanguage: fr

# Languages. DSpace Angular holds a message catalog for each of the following languages.
# When set to active, users will be able to switch to the use of this language in the user interface.
languages:
- code: fr
label: Français
active: true
- code: en
label: English
active: true


# Browse-By Pages
browseBy:
# Amount of years to display using jumps of one year (current year - oneYearLimit)
oneYearLimit: 10
# Limit for years to display using jumps of five years (current year - fiveYearLimit)
fiveYearLimit: 30
# The absolute lowest year to display in the dropdown (only used when no lowest date can be found for all items)
defaultLowerLimit: 1900
# If true, thumbnail images for items will be added to BOTH search and browse result lists.
showThumbnails: true
# The number of entries in a paginated browse results list.
# Rounded to the nearest size in the list of selectable sizes on the
# settings menu.
pageSize: 20

communityList:
# No. of communities to list per expansion (show more)
pageSize: 20

homePage:
recentSubmissions:
# The number of item showing in recent submission components
pageSize: 5
# Sort record of recent submission
sortField: 'dc.date.accessioned'
topLevelCommunityList:
# No. of communities to list per page on the home page
# This will always round to the nearest number from the list of page sizes. e.g. if you set it to 7 it'll use 10
pageSize: 5

# Item Config
item:
edit:
undoTimeout: 10000 # 10 seconds
# Show the item access status label in items lists
showAccessStatuses: false
bitstream:
# Number of entries in the bitstream list in the item view page.
# Rounded to the nearest size in the list of selectable sizes on the
# settings menu. See pageSizeOptions in 'pagination-component-options.model.ts'.
pageSize: 5

# Collection Page Config
collection:
edit:
undoTimeout: 10000 # 10 seconds

# Theme Config
themes:
# Add additional themes here. In the case where multiple themes match a route, the first one
# in this list will get priority. It is advisable to always have a theme that matches
# every route as the last one
#
# # A theme with a handle property will match the community, collection or item with the given
# # handle, and all collections and/or items within it
# - name: 'custom',
# handle: '10673/1233'
#
# # A theme with a regex property will match the route using a regular expression. If it
# # matches the route for a community or collection it will also apply to all collections
# # and/or items within it
# - name: 'custom',
# regex: 'collections\/e8043bc2.*'
#
# # A theme with a uuid property will match the community, collection or item with the given
# # ID, and all collections and/or items within it
# - name: 'custom',
# uuid: '0958c910-2037-42a9-81c7-dca80e3892b4'
#
# # The extends property specifies an ancestor theme (by name). Whenever a themed component is not found
# # in the current theme, its ancestor theme(s) will be checked recursively before falling back to default.
# - name: 'custom-A',
# extends: 'custom-B',
# # Any of the matching properties above can be used
# handle: '10673/34'
#
# - name: 'custom-B',
# extends: 'custom',
# handle: '10673/12'
#
# # A theme with only a name will match every route
# name: 'custom'
#
# # This theme will use the default bootstrap styling for DSpace components
# - name: BASE_THEME_NAME
#

- name: calypso
extends: dspace
headTags:
- tagName: link
attributes:
rel: icon
href: assets/calypso/images/favicons/favicon.ico
sizes: any

- name: dspace
headTags:
- tagName: link
attributes:
rel: icon
href: assets/dspace/images/favicons/favicon.ico
sizes: any
- tagName: link
attributes:
rel: icon
href: assets/dspace/images/favicons/favicon.svg
type: image/svg+xml
- tagName: link
attributes:
rel: apple-touch-icon
href: assets/dspace/images/favicons/apple-touch-icon.png
- tagName: link
attributes:
rel: manifest
href: assets/dspace/images/favicons/manifest.webmanifest

# The default bundles that should always be displayed as suggestions when you upload a new bundle
bundle:
standardBundles: [ ORIGINAL, THUMBNAIL, LICENSE ]

# Whether to enable media viewer for image and/or video Bitstreams (i.e. Bitstreams whose MIME type starts with 'image' or 'video').
# For images, this enables a gallery viewer where you can zoom or page through images.
# For videos, this enables embedded video streaming
mediaViewer:
image: false
video: false

# Whether the end user agreement is required before users use the repository.
# If enabled, the user will be required to accept the agreement before they can use the repository.
# And whether the privacy statement should exist or not.
info:
enableEndUserAgreement: true
enablePrivacyStatement: true

# Whether to enable Markdown (https://commonmark.org/) and MathJax (https://www.mathjax.org/)
# display in supported metadata fields. By default, only dc.description.abstract is supported.
markdown:
enabled: false
mathjax: false

# Which vocabularies should be used for which search filters
# and whether to show the filter in the search sidebar
# Take a look at the filter-vocabulary-config.ts file for documentation on how the options are obtained
vocabularies:
- filter: 'subject'
vocabulary: 'srsc'
enabled: true

# Default collection/community sorting order at Advanced search, Create/update community and collection when there are not a query.
comcolSelectionSort:
sortField: 'dc.title'
sortDirection: 'ASC'
3 changes: 3 additions & 0 deletions src/app/item-page/mirador-viewer/mirador-viewer.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { isPlatformBrowser } from '@angular/common';
import { MiradorViewerService } from './mirador-viewer.service';
import { HostWindowService, WidthCategory } from '../../shared/host-window.service';
import { BundleDataService } from '../../core/data/bundle-data.service';
import { LocaleService } from '../../core/locale/locale.service';

@Component({
selector: 'ds-mirador-viewer',
Expand Down Expand Up @@ -58,6 +59,7 @@ export class MiradorViewerComponent implements OnInit {
private bitstreamDataService: BitstreamDataService,
private bundleDataService: BundleDataService,
private hostWindowService: HostWindowService,
private localeService: LocaleService,
@Inject(PLATFORM_ID) private platformId: any) {
}

Expand Down Expand Up @@ -86,6 +88,7 @@ export class MiradorViewerComponent implements OnInit {
if (this.notMobile) {
viewerPath += '&notMobile=true';
}
viewerPath += '&lang=' + this.localeService.getCurrentLanguageCode();

// TODO: Should the query term be trusted here?
return this.sanitizer.bypassSecurityTrustResourceUrl(viewerPath);
Expand Down
6 changes: 6 additions & 0 deletions src/mirador-viewer/config.default.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ const searchOption = params.get('searchable');
const query = params.get('query');
const multi = params.get('multi');
const notMobile = params.get('notMobile');
const langParam = params.get('lang');

let windowSettings = {};
let sidbarPanel = 'info';
let defaultView = 'single';
let multipleItems = false;
let thumbNavigation = 'off';
let lang = 'en' // Default to english, but should not happen

windowSettings.manifestId = manifest;

Expand All @@ -51,6 +53,9 @@ windowSettings.manifestId = manifest;
}
}
}
if ( langParam !== 'null' ) {
lang = langParam;
}
})();

(Mirador.viewer(
Expand All @@ -59,6 +64,7 @@ windowSettings.manifestId = manifest;
mainMenuSettings: {
show: true
},
language: lang, // The default language set in the application
thumbnailNavigation: {
defaultPosition: thumbNavigation, // Which position for the thumbnail navigation to be be displayed. Other possible values are "far-bottom" or "far-right"
displaySettings: true, // Display the settings for this in WindowTopMenu
Expand Down
45 changes: 45 additions & 0 deletions src/themes/calypso/assets/i18n/fr.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
// "repository.title.prefix": "DSpace Angular :: ",
"repository.title.prefix": "Calypso :: ",

// Les items de menu pour parcourir (browse) tout le contenu

Check failure on line 5 in src/themes/calypso/assets/i18n/fr.json5

View workflow job for this annotation

GitHub Actions / tests (16.x)

Expected indentation of 2 spaces but found 0

Check failure on line 5 in src/themes/calypso/assets/i18n/fr.json5

View workflow job for this annotation

GitHub Actions / tests (18.x)

Expected indentation of 2 spaces but found 0
"menu.section.browse_global": "Tout Calypso",
"menu.section.browse_global_by_title": "Titres",
"menu.section.browse_global_by_dateissued": "Dates de publication",
"menu.section.browse_global_by_author": "Auteurs",
"menu.section.browse_global_by_contributor": "Contributeurs",
"menu.section.browse_global_by_subject": "Sujets",
"menu.section.browse_global_by_titleindex": "Index des titres",

// Les libellés pour parcourir dans une collection
"browse.comcol.head": "Parcourir par",
"browse.comcol.by.title": "Titres",
"browse.comcol.by.dateissued": "Dates de publication",
"browse.comcol.by.author": "Auteurs",
"browse.comcol.by.contributor": "Contributeur",
"browse.comcol.by.subject": "Sujets",
"browse.comcol.by.titleindex": "Index des titres",

// Le nom des champs lorsqu'on parcourt
"browse.metadata.title": "titre",
"browse.metadata.dateissued": "date de publication",
"browse.metadata.author": "auteur",
"browse.metadata.contributor": "Contributeur",
"browse.metadata.subject": "sujet",
"browse.metadata.discipline": "programme",
"browse.metadata.titleindex": "l'index des titres",

// Le nom des fils d'ariane lorsqu'on parcourt
"browse.metadata.title.breadcrumbs": "Parcourir par titre",
"browse.metadata.dateissued.breadcrumbs": "Parcourir par date de publication",
"browse.metadata.author.breadcrumbs": "Parcourir par auteur",
"browse.metadata.contributor.breadcrumbs": "Parcourir par Contributeur",
"browse.metadata.subject.breadcrumbs": "Parcourir par sujet",
"browse.metadata.titleindex.breadcrumbs": "Parcourir l'index des titres",

// Le titre de page lorsqu'on parcourt... c'était "Parcourir la collection"
"browse.title": "Parcourir {{ collection }} par {{ field }} {{ value }}",
"browse.title.page": "Parcourir {{ collection }} par {{ field }} {{ value }}",


}
Binary file not shown.
Loading
Loading